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(8)						      System Manager's Manual						       lastcomm(8)

NAME
lastcomm - Outputs information about the last commands executed SYNOPSIS
lastcomm [Command] [Name] [Tty] DESCRIPTION
The lastcomm command outputs information about all previously executed commands that are recorded in the /var/adm/pacct file in reverse chronological order. You may specify a particular command with the Command parameter, a particular user with the Name parameter, and a particular terminal as the command source with the Tty parameter. Output is then restricted to the specified parameters. A Tty terminal may be named fully (for example, tty0) or abbreviated (for example, 0). The following information is displayed for each process: Name of the command under which the process was called. Any flags collected when the command was executed. The following flags are valid: Command was run with an effective user-id of 0. Command ran after a fork, but without an exec system call following it. Name of the user who issued the command. The terminal the command was started from. Seconds of CPU time used. Time the process started. EXAMPLES
To display information about all previously executed commands recorded in the /var/adm/pacct file, enter: lastcomm Information is displayed similar to: lastcomm ajh lat/620 1.13 secs Thu Feb 24 15:02 pg ajh lat/620 5.91 secs Thu Feb 24 15:01 ln miller ttyp1 1.14 secs Thu Feb 24 15:01 ls rob ttyp1 0.02 secs Thu Feb 24 15:01 pg sjz ttyp1 0.33 secs Thu Feb 24 15:00 sendmail SF root __ 0.01 secs Thu Feb 24 15:00 To display information about commands named a.out executed by the root user on terminal ttyd0, enter: lastcomm a.out root ttyd0 FILES
Specifies the command path. The current accounting file. RELATED INFORMATION
Commands: last(8) delim off lastcomm(8)
All times are GMT -4. The time now is 11:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy