Hello - I didn't find this with search, but I'm guessing it's out there somewhere. Apologies for reposting if that's the case.
I'm shell scripting on a 10.5.8 Mac.
I want to make a program that runs in the background and periodically logs computer use, storing things like - cpu usage, programs running, etc. I know I can get the pid of the most recently called process with $!, but is there a way to get the pid of any arbitrary process, or even to see all pids in use at one time? Do all processes have single, unique pids?
Is it possible to see the number of windows open at any one time?
Yes, all processes have a single unique pid. The ps command might help you. Not sure if this is the same switches on Mac, but you can get for example process stati with:
where the STAT column might be interessting for you. The values are explained in the man page for ps so you might grep for the ones you'd like to see.
Where you can see the number of open windows, I do not know. But maybe you can find them in some X log or also as processes or threads.
Last edited by zaxxon; 09-06-2010 at 05:53 AM..
Reason: typo
Sorry if this is the wrong forum
Searching for Saas Monitor service which monitor my servers which are sitting in different providers .
This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard.
The info I need is CPU / RAM / my servers status (... (1 Reply)
Hi,
input:
1|Bob
2|Bob
Ref|Bob
3|Rick
7|Rick
Ref|Rick
I am trying to append a "*" field to the record containing "Ref" in $1, only if the previous $1 with a common $2 have a value <4.
ouput:
1|Bob
2|Bob
Ref|Bob|*
3|Rick
7|Rick
Ref|Rick (11 Replies)
hi guys
My tivoli monitoring tools is reporting the monitor parameters says Pages Paged out is too high 1600 so it is a critical warning (threshold 400)
now according to them this usually happens at dawn so is there a way to monitor this? during the time I am not working?
ans something... (1 Reply)
What commands would you recommend in order to monitor things like when a user logs on to a server, assuming you know that user's name on the server? (2 Replies)
I need to monitor system activity (RAM, CPU usage, execution time)
while running some tests on solaris, linux and aix and save the output.
Please advise whether there's a utility available for these systems?
How can time the execution of the command?
Thanks! (2 Replies)
Hi everyone, this is probably very simple, but i haven't found anything in the forum, or maybe im just taking the wrong aproach...
I made a script to check a bunch of stuff, this script currently outputs it's findings to the screen, i need to log that output too, i was thinking to just make a... (2 Replies)
Hello,
Does any one knows any tools or method to monitor users all activities on Solaris 8, including command and its result. Similar to 'script' ???
Thanks
nana (3 Replies)
:) Hello, i have been given the following code to help me learn how to use signals, it won't compile. The problem maybe because this was written for use in Unix and i am trying to compile in Linux.
The error i get says that SIGPIPE and SIG_IGN are undeclared.
I think that these are defined... (2 Replies)