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)							   User Commands						       lastcomm(1)

NAME
lastcomm - display the last commands executed, in reverse order SYNOPSIS
lastcomm [-f file] [-x] [command-name] ... [user-name] ... [terminal-name] ... DESCRIPTION
The lastcomm command gives information on previously executed commands. lastcomm with no arguments displays information about all the com- mands recorded during the current accounting file's lifetime. If called with arguments, lastcomm only displays accounting entries with a matching command-name, user-name, or terminal-name. If extended process accounting is active (see acctadm(1M)) and is recording the appro- priate data items, lastcomm attempts to take data from the current extended process accounting file. If standard process accounting is active, lastcomm takes data from the current standard accounting file (see acct(2)). If terminal-name is `- -', there was no controlling TTY for the process. The process was probably executed during boot time. If terminal- name is `??', the controlling TTY could not be decoded into a printable name. For each process entry, lastcomm displays the following items of information: o The command name under which the process was called. o One or more flags indicating special information about the process. The flags have the following meanings: F The process performed a fork but not an exec. S The process ran as a set-user-id program. o The name of the user who ran the process. o The terminal which the user was logged in on at the time (if applicable). o The amount of CPU time used by the process (in seconds). o The date and time the process exited. OPTIONS
The following options are supported: -f file Uses file as the source of accounting data. file may be either an extended process accounting file or a standard process accounting file. -x Uses the currently active extended process accounting file. If extended processing accounting is inactive, no output will be produced. EXAMPLES
Example 1: Listing executions of named commands The command example% lastcomm a.out root term/01 produces a listing of all the executions of commands named a.out by user root while using the terminal term/01. Example 2: Listing all user commands The command example% lastcomm root produces a listing of all the commands executed by user root. FILES
/var/adm/pacct standard accounting file /var/adm/exacct/proc extended accounting file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
last(1), acctadm(1M), acct(2), acct.h(3HEAD), sigvec(3UCB), core(4), attributes(5) SunOS 5.10 10 Jan 2000 lastcomm(1)
All times are GMT -4. The time now is 09:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy