Sponsored Content
Full Discussion: which user ran which command
Top Forums Shell Programming and Scripting which user ran which command Post 302364526 by thegeek on Friday 23rd of October 2009 09:17:33 AM
Old 10-23-2009
This is what you are looking for.
Enabling Process Accounting on Linux HOWTO
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

2. HP-UX

Aaarrggghhh HP warranty ran out

We have HP 9000 running UX. Does anybody know a reputable or even a strong maintenance firm that DOESN'T have a help desk the other side of the planet? We've been approached by Newcorp but thay seem rubbish. Please give me some recommendations. Sorry if this is posted in the wrong room but I... (3 Replies)
Discussion started by: Handsy
3 Replies

3. UNIX for Advanced & Expert Users

grep -v *[^:] Why did this repeat a command i ran earlier today?

I ran grep -v * trying to reverse grep a word before a colon, and discovered it runs a command I had run earlier today. Why? (3 Replies)
Discussion started by: glev2005
3 Replies

4. Shell Programming and Scripting

Identify if ran by su or sudo?

Recently I was on an operational call and heard the people running my code placing the code in the /tmp directory and running as root. I had not planned on that. So I want to add some checks to my code (using ksh93): # ---------- ---------- ---------- # root not allowed to run this #... (3 Replies)
Discussion started by: ericdp63
3 Replies

5. UNIX for Dummies Questions & Answers

Find hangs when ran under superuser.

When I ran the following find command under a "regular" user is completes but it limited because of perms. find / -name "*.*" | xargs grep something > ok But when I try to run it under su, it hangs and never completes. Any suggestion? (4 Replies)
Discussion started by: shorty
4 Replies

6. AIX

IBM AIX ran into error u0.1-p1-v2

Hi Guys, Is there any one can help me with the below error message dispalys on the LED panel. 10112633 u0.1-p1-v2 I bought a second hand IBM 7029 6C3 online several days ago. On the fist day, it can be ran well. but on second day, when i tried to boot up the machine, after few mins, the... (2 Replies)
Discussion started by: andylai
2 Replies

7. Shell Programming and Scripting

how to find whether a script ran or not

Hi, I have written a script and placed in an application and the script can be executed manually only. But somehow one of the method in the script is being called and bringing the application down. But we are not able to find any instance of script running. Is there a way to findout whether the... (1 Reply)
Discussion started by: Satyak
1 Replies

8. UNIX for Dummies Questions & Answers

Test if script was ran w/ nohup

I want to test if script.sh is being run with nohup ... but $0 does not contain nohup part... purpose: script.sh should only be ran with nohup if user forgets nohup then it should echo "run with nohup" && exit....... (2 Replies)
Discussion started by: holyearth
2 Replies

9. Shell Programming and Scripting

Checking if command ran in parallel

Hi, I am running below code For I in $var do .......some line of code....... nohup Sqlplus apps/apps <<EOF & My_proc($I) Exit EOF done Nohup and & is used for parallel processing. Can someone help in determining if the procedure with different arguments Was called paralley or... (3 Replies)
Discussion started by: Pratiksha Mehra
3 Replies

10. UNIX for Dummies Questions & Answers

How many times did the scipt ran?

Hi, Can we able to identify how many times any script was ran per day/week/month/year wise (2 Replies)
Discussion started by: penqueen
2 Replies
acct(5) 							File Formats Manual							   acct(5)

Name
       acct - execution accounting file

Syntax
       #include <sys/acct.h>

Description
       The  system  call makes entries in an accounting file for each process that terminates.	The accounting file is a sequence of entries whose
       layout, as defined by the include file, is:
       typedef u_short comp_t
       struct  acct
       {
	       char    ac_comm[10];   /* Accounting command name */
	       comp_t  ac_utime;      /* Accounting user time */
	       comp_t  ac_stime;      /* Accounting system time */
	       comp_t  ac_etime;      /* Accounting elapsed time */
	       time_t  ac_btime;      /* Beginning time */
	       short   ac_uid;	      /* Accounting user ID */
	       short   ac_gid;	      /* Accounting group ID */
	       short   ac_mem;	      /* average memory usage */
	       comp_t  ac_io;	      /* number of disk IO blocks */
	       dev_t   ac_tty;	      /* control typewriter */
	       char    ac_flag;       /* Accounting flag */
       };

       #define AFORK   0001    /* has executed fork, but no exec */
       #define ASU     0002    /* used super-user privileges */
       #define ACOMPAT 0004    /* used compatibility mode */
       #define ACORE   0010    /* dumped core */
       #define AXSIG   0020    /* killed by a signal */
       #define AHZ     64      /* the accuracy of data is 1/AHZ */

       #ifdef KERNEL
       struct  acct    acctbuf;
       struct  gnode   *acctp;
       #endif
       If the process does an the first 10 characters of the file name appear in ac_comm.  The accounting flag contains  bits  indicating  whether
       was ever accomplished and whether the process ever had superuser privileges.

See Also
       acct(2), execve(2), sa(8)

								       RISC								   acct(5)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy