12-08-2008
The subject of unix Process Accounting is covered in "man 1m acct" and the links from there. If this is not already set up on you computer it requires proper sizing because the accounting files can get very big and the commands are fiddly. The whole subject is made easier with a good book or a training course.
10 More Discussions You Might Find Interesting
1. Solaris
Hello All,
I am quite new to Solaris.
Can someone tell me what's the equivalent of HP-UX ps -efx on Solaris? It basically displays the whole command, instead of te first 80 characters of the command.
I need that to differentiate among multiple Weblogic processes where all the specifics... (1 Reply)
Discussion started by: usfrog
1 Replies
2. Solaris
I'm currently fixing a bug in a C program in which I need to check to make sure another specific application is up and running before continuing.
Are there any SunOS API functions that can provide me with a list of currently running processes on the system? I'd like to avoid using 'ps' with a... (1 Reply)
Discussion started by: jalburger
1 Replies
3. UNIX for Advanced & Expert Users
Hello Community,
I've got a unix server and 13 pcs with windows. I'm trying to built some tiny winy app to monitorize the windows processes. Any one knows if exist some kind of pstools for unix to communicate with windows.
I'm the system administartor so I've got rights in all computers.
... (3 Replies)
Discussion started by: ncatdesigner
3 Replies
4. UNIX for Advanced & Expert Users
Hi all,
How can I get the list of all the processes that are either Orphan or Zombie or Running or Ended or Stopped ?
Please suggest !!
Thanks.
Varun:b: (2 Replies)
Discussion started by: varungupta
2 Replies
5. AIX
Hi Expert,
Can anyone tell what command can list the resources used for each process in AIX, including the following columns:
Process ID, Program Name, Resources used(CPU,RAM,SWAP),Start Time
Thanks!!
Victor Cheung (3 Replies)
Discussion started by: victorcheung
3 Replies
6. UNIX for Dummies Questions & Answers
i read in ps manual that -C cmdlist will just result to processes stated in the cmdlist. i intend to issue this command
ps c -FC "firefox-bin, soffice.bin"
here cmdlist contains two executables only. in the future, this cmdlist will grow. is there a way i can make ps read a csv file as... (2 Replies)
Discussion started by: mbaste2
2 Replies
7. Shell Programming and Scripting
i want to list which process using how many cpu ,but i must be list cpu rate and process name,not only PID
how can i do? (5 Replies)
Discussion started by: utoptas
5 Replies
8. Shell Programming and Scripting
Hi,
I need an output of process running on server, i am executing
ps -ef | grep test
output is
asak 22362 1 0 Nov07 ? 00:00:03 /usr/software/bin/perl-5.8.8 /u/assk/bin/test -v none JOBID=2012117
asak 23748 22362 0 Nov07 ? 00:00:00 /usr/software/bin/perl-5.8.8... (3 Replies)
Discussion started by: asak
3 Replies
9. Shell Programming and Scripting
Most of the code I've seen is been listing processes or capturing process ids, etc. But here's what I need to do. Preferably in Korn shell.
1. do a ps -ef |grep tns |grep -v grep
in order to get a list or Oracle listeners that are running.
2. parse the line into components which... (7 Replies)
Discussion started by: MRMonteith
7 Replies
10. Shell Programming and Scripting
Hi team,
Anyone help me cut a process name from ps -ef output?
lit-dbrac01-b004: $ ps -ef|grep pmon|cut -f5 ...
oracle 448 1 0 2014 ? 00:04:15 ora_pmon_blms50db2
Like I need just the process name:
ora_pmon_blms50db2
Any ideas?
Thanks in advance.
jd (3 Replies)
Discussion started by: jonnyd
3 Replies
acct(4) Kernel Interfaces Manual acct(4)
NAME
acct - per-process accounting file format
SYNOPSIS
DESCRIPTION
Files produced as a result of calling (see acct(2)) have records in the form defined by whose contents are:
typedef ushort comp_t; /* "floating point":
13-bit fraction, 3-bit exponent */
struct acct {
char ac_flag; /* Accounting flag */
char ac_stat; /* Exit status */
uid_t ac_uid; /* Accounting user ID */
gid_t ac_gid; /* Accounting group ID */
dev_t ac_tty; /* control typewriter */
time_t ac_btime; /* Beginning time */
comp_t ac_utime; /* acctng user time in clock ticks */
comp_t ac_stime; /* acctng system time in clock ticks */
comp_t ac_etime; /* acctng elapsed time in clock ticks */
comp_t ac_mem; /* memory usage in clicks */
comp_t ac_io; /* chars trnsfrd by read/write */
comp_t ac_rw; /* number of block reads/writes */
char ac_comm[8]; /* command name */
};
#define AFORK 01 /* has executed fork, but no exec */
#define ASU 02 /* used super-user privileges */
#define ACCTF 0300 /* record type: 00 = acct */
In the flag is turned on by each and turned off by an (see fork(2) and exec(2)). The field is inherited from the parent process and is
reset by any Each time the system charges the process with a clock tick, it also adds to the current process size, computed as follows:
(data size) + (text size) + (number of in-core processes sharing text) +
sum of ((shared memory segment size) / (number of in-core processes attached to segment))
For systems with virtual memory, the text, data, and shared memory sizes refer to the resident portion of the memory segments. The value
of can be viewed as an approximation to the mean process size, as modified by text-sharing.
The structure, which resides with the source files of the accounting commands, represents the total accounting format used by the various
accounting commands:
WARNINGS
The value for a short-lived command gives little information about the actual size of the command because can be incremented while a dif-
ferent command (such as the shell) is being executed by the process.
Kernel internal structures may change from release to release without warning. Applications directly relying on these structures are not
supported.
Accounting files are currently written in 32-bit format. Thus, 64-bit applications which read the files need to make special provisions.
In particular, the header declares the field as rather than a in 64-bit compilations. The field should be cast to in the application
before using it (e.g., in calls to date conversion functions). The accounting file format will be changed to a 64-bit layout at a future
release.
SEE ALSO
acct(2), acct(1M), acctcom(1M), exec(2), fork(2).
STANDARDS CONFORMANCE
acct(4)