Sponsored Content
Operating Systems Solaris Monitoring the output of 'top' command on hourly basis. Post 302345543 by seg on Wednesday 19th of August 2009 01:40:22 PM
Old 08-19-2009
Quote:
Originally Posted by subharai
1. load averages
2. Total no. of processes.
3. CPU state
4. Memory
5. Top 3 process details.

1: `w|head -1`
2: `ps -e|wc -l`
3&4: `vmstat 1 2|tail -1`
5: `ps -elfy|sort +4n -r|head -3`


EDIT:
Duke is right, `sar` is the best way to do this.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grabbing value from command output and monitoring for changes

Hi all, Very new to shell scripting so appreciate some help! There is a process count that I need to monitor, I have the AIX command that gives this value and I've cleaned it up with grep/awk so it only spits out the value I'm interested in: echo "psc -i 10050 -s RELOAD_SERVICE" | tmadmin... (14 Replies)
Discussion started by: monty77
14 Replies

2. Shell Programming and Scripting

how to grep string from hourly basis files

dear all, pls help on this script.. i have many files which will be created every mins in particular directory. i want to grep a particular string from only for unique hour files. from the below code i want to grep a string from only 9th hour files . Ex files: -rw-r--r-- 1 root ... (5 Replies)
Discussion started by: steve2216
5 Replies

3. HP-UX

Sorting top command output in HP_UX 11.11

Hello all, I've been woking on Solaris and Linux (Red Hat) so far but now I've inherited an HP-UX system and having minor issues with syntax...Appreciate if you could help me out here.. 1) I'm trying to sort the output of the top command in HP-UX 11.11 by pressing O (capital O) after typing... (2 Replies)
Discussion started by: luft
2 Replies

4. Shell Programming and Scripting

FTP a file on Hourly basis

Hi, I have to upload a file test_201105281100.txt to a ftp location. The files will be created on hourly basis like test_201105281100.txt, test_201105281200.txt & so on. After a file is uploaded successfully, I need to rename the file as test_201105281100.success & if it is not uploaded... (11 Replies)
Discussion started by: SunilB2011
11 Replies

5. Shell Programming and Scripting

Capturing first output from 'top'-likes command

Is this a stupid code?? top > top.out & sleep 2 kill %1 cat top.out Thanks, (6 Replies)
Discussion started by: Shawn, Lee
6 Replies

6. UNIX for Advanced & Expert Users

Conflicts in the output of TOP command

Hi All, In the output of TOP command in my unix system, i monitored that some process has utilization more than 100% even some process has 4000% utilisation. Please help me understand how it is possible to show more than 100% utilization. Please see the screenshot below:... (2 Replies)
Discussion started by: anand2308
2 Replies

7. Shell Programming and Scripting

Crontab on hourly basis

Hi.. I need to run the script on hourly basis. How do I write the crontab on hourly basis i.e, 9:00, 10:00.....22:00.. 23:00 hours Please let me know if the below is correct one for crontab on hourly basis. 00 * * * * ksh myscript.ksh > /dev/null Regards, John (3 Replies)
Discussion started by: scriptscript
3 Replies

8. Shell Programming and Scripting

Calculate avg response time on hourly basis

Hi, I am trying to calculate avg response time on hourly basis from the log file which has millions of records. As of now I am trying with creating temp file which will have lines with unique id and start time and end time and after that another script will run on this temp file to... (7 Replies)
Discussion started by: random_thoughts
7 Replies

9. UNIX for Dummies Questions & Answers

Top Command Output is not coming via Cronjob

Dear All, I created a small script to get the CPU, GIS usage etc automatically. However when i run this script manually its working , but when i run through cronjob i am not getting any output. Can anyone please help me on this. I am using SuseLinux. Thank you in advance. #!/bin/sh {... (2 Replies)
Discussion started by: Nitin Kapoor
2 Replies
VMSTAT(8)						   Linux Administrator's Manual 						 VMSTAT(8)

NAME
vmstat - Report virtual memory statistics SYNOPSIS
vmstat [-a] [-n] [delay [ count]] vmstat [-f] [-s] [-m] vmstat [-S unit] vmstat [-d] vmstat [-p disk partition] vmstat [-V] DESCRIPTION
vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity. The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case. Options The -a switch displays active/inactive memory, given a 2.5.41 kernel or better. The -f switch displays the number of forks since boot. This includes the fork, vfork, and clone system calls, and is equivalent to the total number of tasks created. Each process is represented by one or more tasks, depending on thread usage. This display does not repeat. The -m displays slabinfo. The -n switch causes the header to be displayed only once rather than periodically. The -s switch displays a table of various event counters and memory statistics. This display does not repeat. delay is the delay between updates in seconds. If no delay is specified, only one report is printed with the average values since boot. count is the number of updates. If no count is specified and delay is defined, count defaults to infinity. The -d reports disk statistics (2.5.70 or above required) The -p followed by some partition name for detailed statistics (2.5.70 or above required) The -S followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes The -V switch results in displaying version information. FIELD DESCRIPTION FOR VM MODE
Procs r: The number of processes waiting for run time. b: The number of processes in uninterruptible sleep. Memory swpd: the amount of virtual memory used. free: the amount of idle memory. buff: the amount of memory used as buffers. cache: the amount of memory used as cache. inact: the amount of inactive memory. (-a option) active: the amount of active memory. (-a option) Swap si: Amount of memory swapped in from disk (/s). so: Amount of memory swapped to disk (/s). IO bi: Blocks received from a block device (blocks/s). bo: Blocks sent to a block device (blocks/s). System in: The number of interrupts per second, including the clock. cs: The number of context switches per second. CPU These are percentages of total CPU time. us: Time spent running non-kernel code. (user time, including nice time) sy: Time spent running kernel code. (system time) id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time. wa: Time spent waiting for IO. Prior to Linux 2.5.41, included in idle. st: Time stolen from a virtual machine. Prior to Linux 2.6.11, unknown. FIELD DESCRIPTION FOR DISK MODE
Reads total: Total reads completed successfully merged: grouped reads (resulting in one I/O) sectors: Sectors read successfully ms: milliseconds spent reading Writes total: Total writes completed successfully merged: grouped writes (resulting in one I/O) sectors: Sectors written successfully ms: milliseconds spent writing IO cur: I/O in progress s: seconds spent for I/O FIELD DESCRIPTION FOR DISK PARTITION MODE
reads: Total number of reads issued to this partition read sectors: Total read sectors for partition writes : Total number of writes issued to this partition requested writes: Total number of write requests made for partition FIELD DESCRIPTION FOR SLAB MODE
cache: Cache name num: Number of currently active objects total: Total number of available objects size: Size of each object pages: Number of pages with at least one active object totpages: Total number of allocated pages pslab: Number of pages per slab NOTES
vmstat does not require special permissions. These reports are intended to help identify system bottlenecks. Linux vmstat does not count itself as a running process. All linux blocks are currently 1024 bytes. Old kernels may report blocks as 512 bytes, 2048 bytes, or 4096 bytes. Since procps 3.1.9, vmstat lets you choose units (k, K, m, M) default is K (1024 bytes) in the default mode vmstat uses slabinfo 1.1 FIXME FILES
/proc/meminfo /proc/stat /proc/*/stat SEE ALSO
iostat(1), sar(1), mpstat(1), ps(1), top(1), free(1) BUGS
Does not tabulate the block io per device or count the number of system calls. AUTHORS
Written by Henry Ware <al172@yfn.ysu.edu>. Fabian Frederick <ffrederick@users.sourceforge.net> (diskstat, slab, partitions...) Throatwobbler Ginkgo Labs 27 July 1994 VMSTAT(8)
All times are GMT -4. The time now is 12:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy