10 More Discussions You Might Find Interesting
1. Solaris
Hi,
Recently i have write a simple script to capture CPU high usage based on prstat but i found out that it did capture correctly. I need to capture the rows that contains CPU usage more than 3%. Below line which i thought will capture CPU usage based CPU column in prstat(9th parameter) which is... (3 Replies)
Discussion started by: tharmendran
3 Replies
2. Shell Programming and Scripting
Hi,
How can I find total CPU usage in percentage? e.g. if my system has 8 CPUs and I want to list total usage for all of them, is it possible through a command?
I have tried some of the commands like top, mpstat, sar. The output of those commands has to be manipulated to derive the percentage... (14 Replies)
Discussion started by: jal_capri
14 Replies
3. Shell Programming and Scripting
I'm writing a bash script to log some selections from a sensors output (core temp, mb temp, etc.) and I would also like to have the current cpu usage as a percentage. I have no idea how to go about getting it in a form that a bash script can use. For example, I would simply look in the output of... (3 Replies)
Discussion started by: graysky
3 Replies
4. Solaris
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
5. UNIX for Dummies Questions & Answers
hi,
i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies
6. Programming
you know that.. in HP-UX..
in sys/pstat.h
struct pst_status {
long pst_idx; /* Index for further pstat() requests */
long pst_uid; /* Real UID */
long pst_pid; /* Process ID */
....
float pst_pctcpu; /* %cpu for this process during p_time... (3 Replies)
Discussion started by: sangjinn
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
8. UNIX for Dummies Questions & Answers
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies
9. HP-UX
Using HP-UX v11
Need to monitor cpu and memory usage, total for system and separately for each user in command-line mode.
Found out next ways to monitor total cpu usage under hp-ux:
1) vmstat, also shows free memory
2) sar -M
ps -eo user,pcpu - does not work, means 'user-defined format'... (4 Replies)
Discussion started by: hp-ux-user
4 Replies
10. Programming
question: for the below program
i just printed the value for pid, child pid and parent pid
why does it give me 6 values? i assume ppid is 28086
but can't figure out why there are 5 values printed instead of just two!
can someone comment on that!
#include<stdio.h>
#define DIM 8
int... (3 Replies)
Discussion started by: a25khan
3 Replies