Sponsored Content
Full Discussion: Check programs used most
Top Forums UNIX for Advanced & Expert Users Check programs used most Post 302435726 by methyl on Thursday 8th of July 2010 05:47:35 AM
Old 07-08-2010
There is a standard unix package called "System Accounting". See "man 1m acct". It includes Process Accounting. It is a significant chore to set up and on a busy system creates very large data files ... but it can be worth the effort expecially if you buy a 3rd party presentation package.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where did my programs go?

I notice that (Mandrake) Linux and Windows do not seem to operate alike in terms of installing third party software. Windows, on one hand, creates icons and adds items to the Start Menu, with the help of the InstallShield--or equivalent, of course, but Linux, on the other hand, seems to care... (3 Replies)
Discussion started by: helvetica
3 Replies

2. Programming

TSR programs

hi I want to write a tsr routine which use to replace the screen saver program, is it possible in unix? how to write a tsr in UNIX? what is address of screen saver program so that i can replace my routine in that address. (6 Replies)
Discussion started by: rajashekaran
6 Replies

3. Linux

Linux-programs

I have installed Red Hat Linux 9.0 recently on my computer. Im wondering if there are any good sites for downloading linux programs besides the site of Red Hat. Thank you in advance!:D (4 Replies)
Discussion started by: SolidSnake
4 Replies

4. Shell Programming and Scripting

shell programs

how to write pipe for finding out the login names and login time of the users whose login name begins with p. (1 Reply)
Discussion started by: rameshparsa
1 Replies

5. Solaris

Compiling programs

Hi guys i have posted a thread months ago and a guy called dukenuke or smething like that told me that i have to install Sun Studio if i want to be able to compile programs. I have installed Sun Studio 12 and put it in my PATH but no success compiling anything. when i download some source (tar.gz)... (2 Replies)
Discussion started by: saveka
2 Replies

6. UNIX for Dummies Questions & Answers

Are programs like sys_open( ) ,sys_read( ) et al examples of system level programs ?

Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies

7. UNIX for Advanced & Expert Users

check user installed programs

How do check the programs that the actual user of the computer installed. I do not care at all about the default programs that came with your distro of Linux, I only want the user installed programs. (1 Reply)
Discussion started by: cokedude
1 Replies

8. Shell Programming and Scripting

Installation of programs

I have installed a program and put the stuff on /usr/local/ However when I run a script it gives an error GMT Fatal Error: /home/chrisd/Dimech/GMT4.5.2/share/PS_font_info.d: No such file or directory (1 Reply)
Discussion started by: kristinu
1 Replies

9. Programming

Makefiles for different programs

I have several programs in several directories and want to use make to build the executables. What I have done is to put the main programs in their own directory together with a makefile to build the program. Then I am thinking of having another makefile residing in the directory above so I can run... (1 Reply)
Discussion started by: kristinu
1 Replies

10. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies
ACCT(5) 						     Linux Programmer's Manual							   ACCT(5)

NAME
acct - process accounting file SYNOPSIS
#include <sys/acct.h> DESCRIPTION
If the kernel is built with the process accounting option enabled (CONFIG_BSD_PROCESS_ACCT), then calling acct(2) starts process account- ing, for example: acct("/var/log/pacct"); When process accounting is enabled, the kernel writes a record to the accounting file as each process on the system terminates. This record contains information about the terminated process, and is defined in <sys/acct.h> as follows: #define ACCT_COMM 16 typedef u_int16_t comp_t; struct acct { char ac_flag; /* Accounting flags */ u_int16_t ac_uid; /* Accounting user ID */ u_int16_t ac_gid; /* Accounting group ID */ u_int16_t ac_tty; /* Controlling terminal */ u_int32_t ac_btime; /* Process creation time (seconds since the Epoch) */ comp_t ac_utime; /* User CPU time */ comp_t ac_stime; /* System CPU time */ comp_t ac_etime; /* Elapsed time */ comp_t ac_mem; /* Average memory usage (kB) */ comp_t ac_io; /* Characters transferred (unused) */ comp_t ac_rw; /* Blocks read or written (unused) */ comp_t ac_minflt; /* Minor page faults */ comp_t ac_majflt; /* Major page faults */ comp_t ac_swaps; /* Number of swaps (unused) */ u_int32_t ac_exitcode; /* Process termination status (see wait(2)) */ char ac_comm[ACCT_COMM+1]; /* Command name (basename of last executed command; null-terminated) */ char ac_pad[X]; /* padding bytes */ }; enum { /* Bits that may be set in ac_flag field */ AFORK = 0x01, /* Has executed fork, but no exec */ ASU = 0x02, /* Used superuser privileges */ ACORE = 0x08, /* Dumped core */ AXSIG = 0x10 /* Killed by a signal */ }; The comp_t data type is a floating-point value consisting of a 3-bit, base-8 exponent, and a 13-bit mantissa. A value, c, of this type can be converted to a (long) integer as follows: v = (c & 0x1fff) << (((c >> 13) & 0x7) * 3); The ac_utime, ac_stime, and ac_etime fields measure time in "clock ticks"; divide these values by sysconf(_SC_CLK_TCK) to convert them to seconds. Version 3 Accounting File Format Since kernel 2.6.8, an optional alternative version of the accounting file can be produced if the CONFIG_BSD_PROCESS_ACCT_V3 option is set when building the kernel. With this option is set, the records written to the accounting file contain additional fields, and the width of c_uid and ac_gid fields is widened from 16 to 32 bits (in line with the increased size of UID and GIDs in Linux 2.4 and later). The records are defined as follows: struct acct_v3 { char ac_flag; /* Flags */ char ac_version; /* Always set to ACCT_VERSION (3) */ u_int16_t ac_tty; /* Controlling terminal */ u_int32_t ac_exitcode; /* Process termination status */ u_int32_t ac_uid; /* Real user ID */ u_int32_t ac_gid; /* Real group ID */ u_int32_t ac_pid; /* Process ID */ u_int32_t ac_ppid; /* Parent process ID */ u_int32_t ac_btime; /* Process creation time */ float ac_etime; /* Elapsed time */ comp_t ac_utime; /* User CPU time */ comp_t ac_stime; /* System time */ comp_t ac_mem; /* Average memory usage (kB) */ comp_t ac_io; /* Characters transferred (unused) */ comp_t ac_rw; /* Blocks read or written (unused) */ comp_t ac_minflt; /* Minor page faults */ comp_t ac_majflt; /* Major page faults */ comp_t ac_swaps; /* Number of swaps (unused) */ char ac_comm[ACCT_COMM]; /* Command name */ }; VERSIONS
The acct_v3 structure is defined in glibc since version 2.6. CONFORMING TO
Process accounting originated on BSD. Although it is present on most systems, it is not standardized, and the details vary somewhat between systems. NOTES
Records in the accounting file are ordered by termination time of the process. In kernels up to and including 2.6.9, a separate accounting record is written for each thread created using the NPTL threading library; since Linux 2.6.10, a single accounting record is written for the entire process on termination of the last thread in the process. The proc/sys/kernel/acct file, described in proc(5), defines settings that control the behavior of process accounting when disk space runs low. SEE ALSO
lastcomm(1), acct(2), accton(8), sa(8) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-06-15 ACCT(5)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy