[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
|
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
9754.0. "script to collect statistics" by HANDVC::QA () Thu May 08 1997 07:41
1) is this the most correct way to display the belowed statistic at a
particular instance :
- cpu utilization (pcpu)
- memory utilization (pmem)
- I/O utilization (inblock,oublock)
- SWAP utilization (nswap)
Now to collect one sample of statistics, I do :
^^^^^^^^^^
> ps -o ucomm,pmem,nswap,inblock,oublock,pcpu
COMMAND %MEM NSWAP INBLK OUBLK %CPU
csh 0.3 0 14 8 0.0
netscape 9.6 0 8143 6848 0.0
2) now I want to calculate the peak and average of these statistics
for each day
- cpu utilization (pcpu)
- memory utilization (pmem)
- I/O utilization (inblock,oublock)
- SWAP utilization (nswap)
by collecting samples every 15 min, how can I write a script
to calculate the peak and average with the collected samples ?
I will have 4 samples per hour so I will have 4X24= 96 samples.
3) next I want to calculate the above statistics but :
- by user name
- by process name
- for the whole system
How should I modify the above script ?
4) finally I want to store the statistics for each day :
- peak and average cpu utilization
- peak and average memory utilization
- peak and average I/O utilization
- peak and average SWAP utilization
and calculate the peak and average for the month.
what will be the easiest way to do by scripting ?
T.R | Title | User | Personal Name | Date | Lines
|
---|