Sponsored Content
Operating Systems Linux Debian Some commands not logged in pacct Post 302665823 by suvios on Tuesday 3rd of July 2012 08:30:21 AM
Old 07-03-2012
Some commands not logged in pacct

Hi,

Examining the Debian Linux logfiles, I found out that not all commands are logged in my pacct (/var/log/account/pacct)

For instance, if I run and stop Wireshark and do after that

# lastcomm | grep "wireshark"

The wireshark command is logged as expected.

Code:
# lastcomm | grep "wireshark"
wireshark            X user   pts/4      0.68 secs Sun Jul  1 18:55
#

But if i do the same with for instance Gedit, then i got nothing.

Code:
# lastcomm | grep "gedit"
#

What could be the reason for that?


I looked already for quite a long time on the internet for answers but couldn't find them. And all the tutorials talk about the logging of ALL executed commands, not about any exceptions. So, I am a bit confused.

Till now, all the applications i tested where graphical applications of Gnome those are not logged, like:
gedit, gthumb and evolution. So just a thought: Could the reason perhaps lie in the fact that those applications are part of some bigger 'application' that is still running?

Last edited by suvios; 07-03-2012 at 11:36 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

know who logged and logged out with their timings

being ordinary user (not having any administrative rights) can avail myself a facility to know who logged and logged out with their timings get popped onto my terminal as if it get echo 'ed... (3 Replies)
Discussion started by: vkandati
3 Replies

2. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

3. UNIX for Advanced & Expert Users

su ?? Who logged in First ??

Hi all, Say my login user id is "t007" and I login into the unix server first using my id and password and then I used to use "su" command to switch the user using root user id and password. Now, how the third person will come to know who has logged in as a first user ? As: Login: t007... (2 Replies)
Discussion started by: varungupta
2 Replies

4. Solaris

Can I gzip or delete pacct files in solaris ?

Hi, On my server there are so many pacct files in /var/adm. It is eating up my /var partition. Can I delete or gzip those files ? Thanks NeeleshG (3 Replies)
Discussion started by: neel.gurjar
3 Replies

5. Programming

logged in or logged out?

I have wrote a service with c++ which is always run and now I want to get with it the exact time in that the user log in or log out and then run a script. but the problem is that how could i find that the user logged in or logged out with out checking something frequently? thanks (9 Replies)
Discussion started by: mrhosseini
9 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. Shell Programming and Scripting

Who are all logged out

I have a situation where I have to capture information of all users who log out, along with the terminal info(tty command). For example, I may have logged in with /dev/pts/2 as well as /dev/pts4. Now, when I log out of the session with /dev/pts/2, I need that to be sent in an email to a... (1 Reply)
Discussion started by: ggayathri
1 Replies

8. Solaris

Require some way or shell in which commands doesnot gets logged in history file

Guys, can u tell me some way in which the commands i execute on solaris system doesnot gets logged. It should not appear in history file.. Is there any shell which provide such solution or can I turn off the logging, if yes then how... Help will be appreciated Thanks (2 Replies)
Discussion started by: harpreetrekhi
2 Replies

9. Shell Programming and Scripting

Script to identify logged users & commands executed

Hi All, I am trying to write a script to get the user information & the command executed. I tried something like this : w | sort | awk '{print$5$6$7}' My requirement is to identify the users who execute the same command at same time. I need the user name & the... (2 Replies)
Discussion started by: vijayarajvp
2 Replies

10. Solaris

Are FSCK commands logged during single user mode?

Who knows if when working in the single user mode that any command are logged or could b elogged specially if I do a fsck I like at least to see when I did start it. (1 Reply)
Discussion started by: manni2
1 Replies
LASTCOMM(1)						    BSD General Commands Manual 					       LASTCOMM(1)

NAME
lastcomm -- show last commands executed in reverse order SYNOPSIS
lastcomm [-w] [-f file] [command ...] [user ...] [terminal ...] DESCRIPTION
lastcomm gives information on previously executed commands. With no arguments, lastcomm prints information about all the commands recorded during the current accounting file's lifetime. Option: -f file Read from file rather than the default accounting file. -w Use as many columns as needed to print the output instead of limiting it to 80. If called with arguments, only accounting entries with a matching command name, user name, or terminal name are printed. So, for example: lastcomm a.out root ttyd0 would produce a listing of all the executions of commands named a.out by user root on the terminal ttyd0. For each process entry, the following are printed. o The name of the user who ran the process. o Flags, as accumulated by the accounting facilities in the system. o The command name under which the process was called. o The amount of cpu time used by the process (in seconds). o The time the process started. o The elapsed time of the process. The flags are encoded as follows: ``S'' indicates the command was executed by the super-user, ``F'' indicates the command ran after a fork, but without a following exec(3), ``C'' indicates the command was run in PDP-11 compatibility mode (VAX only), ``D'' indicates the command terminated with the generation of a core file, and ``X'' indicates the command was terminated with a signal. The ``S'' and ``C'' flags are no longer recorded by the system, but will be reported by lastcomm when reading from an accounting file gener- ated by an older version of the system. FILES
/var/account/acct Default accounting file. SEE ALSO
last(1), sigaction(2), acct(5), core(5) HISTORY
The lastcomm command appeared in 3.0BSD. BSD
January 31, 2012 BSD
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy