| | |
Calculate the amount of time in the linux process using perl script
Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2004
Posts: 4
Reputation:
Solved Threads: 0
Hello all!
Can somebody help me write a perl script which totals the total amount of time that each user is using on the system, as well as the number of processes the user is using.
As example:
The output of your program would be the following:
root 00:01:18 13
ananias 00:00:00 1
dias 00:00:00 1
peter 00:00:00 1
Can somebody help me write a perl script which totals the total amount of time that each user is using on the system, as well as the number of processes the user is using.
As example:
The output of your program would be the following:
root 00:01:18 13
ananias 00:00:00 1
dias 00:00:00 1
peter 00:00:00 1
>Can somebody help me write a perl script which totals the total amount of time that each user is using on the
>system, as well as the number of processes the user is using.
Pipe the result of a call to ps through your script and parse it, saving the items you want and calculating your totals. ps is different for every system, so do a man ps and when you have more information and you've actually made an attempt, come back and we can help more.
>system, as well as the number of processes the user is using.
Pipe the result of a call to ps through your script and parse it, saving the items you want and calculating your totals. ps is different for every system, so do a man ps and when you have more information and you've actually made an attempt, come back and we can help more.
I'm here to prove you wrong.
![]() |
Similar Threads
- Modifying a Perl script for multiple lines of html... (Perl)
- Unix shell access from Perl script (Perl)
- How to modify this perl script and make it running in Linux , solaris and windowXP? (Perl)
- How to call a perl script in the C# app? (C#)
- perl script help re: scope/structure for noob (Perl)
- Create a perl script for string matching (ASP)
- how to make member expire after so many days with php script (PHP)
Other Threads in the Perl Forum
- Previous Thread: contribute to my program
- Next Thread: Perl script to check doc_b against doc_a for inconsistence
| Thread Tools | Search this Thread |






