HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- More detail from lastcomm
Operating System - HP-UX
1833123
Members
3107
Online
110051
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2002 07:38 AM
09-05-2002 07:38 AM
More detail from lastcomm
Hi folks,
This is a process accounting question. I've got process accounting running, but ...
Is there a way to get more detail out of lastcomm? I see items like process name, owner, tty, etc. However, I do not see items such as PID or command parameters.
Is there a way to get at such information? Do I need additional software to get this level of granularity? (Or do I need additional switches/existing commands?)
Thanks in advance. I'm on HP-UX 11.0.
This is a process accounting question. I've got process accounting running, but ...
Is there a way to get more detail out of lastcomm? I see items like process name, owner, tty, etc. However, I do not see items such as PID or command parameters.
Is there a way to get at such information? Do I need additional software to get this level of granularity? (Or do I need additional switches/existing commands?)
Thanks in advance. I'm on HP-UX 11.0.
Command-Line Junkie
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2002 08:28 AM
09-05-2002 08:28 AM
Re: More detail from lastcomm
Change your syntax that you use. See if the example from the man page gives you more of what you're looking for:
"lastcomm gives information on previously executed commands. If no arguments are specified, lastcomm prints information about all the commands recorded in the accounting file, /var/adm/pacct during the current accounting file's lifetime. If called with arguments, only accounting entries with a matching command name, user name, or terminal name are printed.
For example, to produce a listing of all executions of commands named a.out by user root on terminal ttyd0 use:
lastcomm a.out root ttyd0
"
Cheryl
"lastcomm gives information on previously executed commands. If no arguments are specified, lastcomm prints information about all the commands recorded in the accounting file, /var/adm/pacct during the current accounting file's lifetime. If called with arguments, only accounting entries with a matching command name, user name, or terminal name are printed.
For example, to produce a listing of all executions of commands named a.out by user root on terminal ttyd0 use:
lastcomm a.out root ttyd0
"
Cheryl
"Downtime is a Crime."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2002 08:37 AM
09-05-2002 08:37 AM
Re: More detail from lastcomm
Daniel,
One addition. I found a ER that should address this.
1653112359 "ER: Request a for a method for "root" to trace all commands a user exec"
This ER says that the full path and any options should be tracked as well by accounting.
Currently the only workaround is to track shell history. If you don't already do this, you would set in the /etc/profile (global profile):
HISTSIZE=500
HISTFILE=$HOME/.sh_history
export HISTSIZE HISTFILE
$HOME/.sh_history should exist for each user.
Cheryl
One addition. I found a ER that should address this.
1653112359 "ER: Request a for a method for "root" to trace all commands a user exec"
This ER says that the full path and any options should be tracked as well by accounting.
Currently the only workaround is to track shell history. If you don't already do this, you would set in the /etc/profile (global profile):
HISTSIZE=500
HISTFILE=$HOME/.sh_history
export HISTSIZE HISTFILE
$HOME/.sh_history should exist for each user.
Cheryl
"Downtime is a Crime."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2002 08:38 AM
09-05-2002 08:38 AM
Re: More detail from lastcomm
Hi!
I'm afraid this is not possible with lastcomm.
However, you may have a look at the acct structure in /usr/include/sys/acct.h. There you see what is _theoretically_ available. The pacct file is simply a sequence of acct structs.
Maybe you could get more info using auditing?
Regards...
Dietmar.
I'm afraid this is not possible with lastcomm.
However, you may have a look at the acct structure in /usr/include/sys/acct.h. There you see what is _theoretically_ available. The pacct file is simply a sequence of acct structs.
Maybe you could get more info using auditing?
Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP