Solaris 5.10 CPU Information With Timestamp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Solaris 5.10 CPU Information With Timestamp
# 1  
Old 06-20-2013
Solaris 5.10 CPU Information With Timestamp

Hi,

In Solaris 5.10, can I run a command or a small script that will output
CPU% user, system, wait and idle (The output from iostat or vmstat)
along with a date/timestamp. The date/timestamp can be in any
format that is easy to understand.

I intend to use crontab to call the script once an hour.

So, example:


June 20, 2013 5:47:48 PM 1 1 0 98 (us, sy, wt, id from iostat)
June 20, 2013 6:47:48 PM 1 2 0 97


Thanks,
QZ1
# 2  
Old 06-20-2013
This User Gave Thanks to DukeNuke2 For This Post:
# 3  
Old 06-20-2013
Duke's suggestion is spot on. The only thing to note is there have to be some crontab jobs setup to gather raw data so you can view it and see trends.

If you want an instant system snapshot of right now -
Code:
prstat

is your choice. You can use iostat/vmstat to do the same thing.

There is no tool that sticks the two together - you have to code something up yourself. On a per user basis that information is in /proc.
Rich Teer's site (Solaris system programming) has C code to do just. Look for psrinfo.c.

Click the Source code link here:

http://www.rite-group.com/rich/ssp/index.html

Last edited by jim mcnamara; 06-20-2013 at 11:57 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cpu information

hi unix expert is there any program in terminal to show cpu and ram information? and usage of this? Many thanks samad (3 Replies)
Discussion started by: abdossamad2003
3 Replies

2. Red Hat

CPU and Cores information

Hi all. I have a question about linux command to find number of CPU and Core. I usually use the command dmidecode -t processor to find cpu and core numbers . On this machine with Red Hat 4. 0 when I try to insert the command is returned the error -bash: dmidecode: command not found I try to... (8 Replies)
Discussion started by: piccolinomax
8 Replies

3. Shell Programming and Scripting

Core and cpu information of HP-UX machine

Hi All, i am trying to retrive below information from any hp-ux machine (physical & virtual both): 1.Processor Total Count: 2.Processor Core Count: 3.Processor type: 4.number of physical processors: 5 number of virtual processors: i am trying to use command 'print_manifest' as... (0 Replies)
Discussion started by: omkar.jadhav
0 Replies

4. AIX

Finding cpu information on vio client

Hi, I am having single p series blade with Single Physcial CPU with dual core, on that vio server is installed, I have created vio client allocate 0.9 each cpu , now when I am running prtconf command on vio client it is showing "2" no of processor, My query using which command it will... (1 Reply)
Discussion started by: manoj.solaris
1 Replies

5. Shell Programming and Scripting

How to get the information about cpu idle from top command?

I am using Ubuntu 9.04. I want to write a shell script to get the information about cpu idle from top command at the real time when i call it, compare cpu idle with 20 (20%), if cpu idle > 20 exit 1, vice versa exit 0. Anybody can help me to resolve it ? Thanks alot. (7 Replies)
Discussion started by: huyquocnguyen
7 Replies

6. Solaris

cpu-shares vs cpu-cap in solaris

Can anyone tell me difference between cpu-shares vs cpu-cap in solaris & how FSS will work with cpu-caps ? (9 Replies)
Discussion started by: fugitive
9 Replies

7. Shell Programming and Scripting

sort for timestamp information-YYYY-MM-DD HH:MM:SS

Dear all, Please advice how do I sort a file based on timestamp information. I want to sort the second column in asc/desc order which has timestamp information in format YYYY-MM-DD HH:MM:SS Example File - Input.txt contains cat ss.txt 100|2009-03-30 11:38:43 141|2009-06-01 12:12:01... (1 Reply)
Discussion started by: sureshg_sampat
1 Replies

8. Solaris

Multi CPU Solaris system shows 100% CPU usage.

Hello Friends, On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization. ========================================================================= $ prstat -a ... (4 Replies)
Discussion started by: mahive
4 Replies

9. Solaris

FRU information for the CP3060 CPU

Hi I need CPU fru information for the CP3060. I know that the CPU's are on the board and board info can be obtained with the command clia board. COuld anyone tell me how i can get the CPU's FRU info from this? (1 Reply)
Discussion started by: mk2339
1 Replies

10. UNIX for Advanced & Expert Users

CPU Usage Information

how would I list the high end of CPU utilization for the previous hours of the day. I don't need to know the averages. I'm wanting to know the high and low, etc. for what ever time interval that is avaliable? Thank you. (2 Replies)
Discussion started by: cubs0729
2 Replies
Login or Register to Ask a Question