CPU usage per user


 
Thread Tools Search this Thread
Operating Systems HP-UX CPU usage per user
# 1  
Old 12-03-2008
CPU usage per user

Hello everybody,
How can we proceed to measure the CPU used par a user on unix HPUX ?
there some commands or tools ?

Thank you in advance.
# 2  
Old 12-03-2008
Something like:
ant:/home/vbe $ ./user_ps patrol
144 patrol 14347 1 0.15 vmstat 5 2
216 patrol 1292 0 0.02 ds_listener -port=50005 -hosts= -period=3:00 -interval=1440 -lo
268 patrol 12379 0 0.02 /usr/bin/ksh
268 patrol 3638 0 0.02 /usr/bin/ksh
16692 patrol 1369 19 1.24 PatrolAgent
patrol PID 12379 %CPU = 0
TOTCPU = 0
patrol PID 14347 %CPU = 1
TOTCPU = 1
patrol PID 1369 %CPU = 19
TOTCPU = 20
patrol PID 1292 %CPU = 0
TOTCPU = 20
patrol PID 3638 %CPU = 0
TOTCPU = 20
total cpu load for patrol = 5

?
As you can (not really...) see, I wrote a script... running PA-RISC HPUX 11.11 using ps (XPG4...)
# 3  
Old 12-03-2008
but in my server I don't have the evoqued script :
/home/vbe/user_ps patrol
Could you please send it to me ?
Thank you in advance.
# 4  
Old 12-03-2008
And we dont know on what you are running...
The script I wrote is just an idea using UNIX95 syntax (XPG4) of ps, so do a man of ps to see what can be done, then there is maybe more simple: the command top has a -f option for putting in a file rather than displaying..You could write a script using the file, by grep the user and totalize the %CPU , you could maybe use glance...

Now if you want to bring some ameliorations my first script for the community (I lack of time lately...), and at the same time see what can be done using XPG4, then I will gladly share here...

All the best

Last edited by vbe; 12-03-2008 at 01:31 PM..
# 5  
Old 12-06-2008
Bug

Hey !! U can use the top command to check the cpu usage of all users separately ..

Thanks Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How can i restrict user high cpu usage?

HI In my M5000 , one of domain is having SAp installed. from today onwards we are facing some stange issue. when we start SAP application, that particular user is taking 95 % of system CP and renaming 5 % is taken by system . because of this reason application is slow. i have 4 CPU(32... (4 Replies)
Discussion started by: bentech4u
4 Replies

2. UNIX for Dummies Questions & Answers

Is total CPU usage for sar %user+%system+%iowait?

Hi all Can anyone advise/confirm whether total CPU usage when running sar is %user+%system+%iowait or is it %user+%system only? I want to confirm whether I am having a CPU-bound problem or not. This is a single-CPU VMware machine. $ sar 5 20 Linux 2.6.18-238.5.1.el5... (7 Replies)
Discussion started by: newbie_01
7 Replies

3. Shell Programming and Scripting

Command to check the CPU usage for particular user

Hi All, Can anybody knows, how to check the CPU usage in percentage for a particular process along with its user and PID? Thanks in advance!! (3 Replies)
Discussion started by: AB10
3 Replies

4. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

5. 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

6. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

7. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

8. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

9. HP-UX

How to determine cpu&memory percentage usage per user

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

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies
Login or Register to Ask a Question