- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: wtmps access
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО07-14-2005 10:49 AM
тАО07-14-2005 10:49 AM
wtmps access
Is there any other way to get the same output as the "last" command but with the "YEAR" information in the date field ?
Any help will be appreciated.
- Tags:
- wtmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2005 12:37 AM
тАО07-15-2005 12:37 AM
Re: wtmps access
Do you mean /var/adm/wtmp or /var/adm/wtmpx? I don't seem to see any /var/adm/wtmps file.
Please clarify.
Thanks...
-- Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2005 12:54 AM
тАО07-15-2005 12:54 AM
Re: wtmps access
You should periodically clear out the files so you KNOW exactly when someone logged in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2005 01:15 AM
тАО07-16-2005 01:15 AM
Re: wtmps access
The system auditing requires to be carried out periodically & these logs should be cleared out alongwith that. Otherwise also viewing a information older than few months did not achive much.
If still you require you utilize this information for that than all your entries are visible in the output in descending order sorted by date. So you should be easily able to differentiate in multiple entries of same month in two different years.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-17-2005 03:50 PM
тАО07-17-2005 03:50 PM
Re: wtmps access
$ /usr/sbin/acct/fwtmp -X < /var/adm/wtmps
system boot 0 2 0000 0000 1115882951 0 May 12 07:29:11 2005
0
...
- Tags:
- fwtmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 03:24 AM
тАО07-18-2005 03:24 AM
Re: wtmps access
It seems that /var/adm/wtmp and wtmpx will be obsolete in future releases of HPUX. The new file is /var/adm/wtmps. I can get the last login information using /usr/sbin/acct/fwtmp as suggested by Ermin. Iam curious as to which data structure is used to store entries in this file. I have a small C program which takes out the last entry ( on Solaris and AIX ) and sends it to server for reporting and it would be easy to just use the new data structure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 12:17 PM
тАО07-18-2005 12:17 PM
Re: wtmps access
Here is a sample C program that should work.
#include
#include
int main()
{
struct utmps *wtmps;
bwtmpname(WTMPS_FILE);
while ((wtmps = getbwent(sizeof(struct utmps))) != NULL) {
printf("%-8.8s %-12.12s %5ld %2hd %lu %s\n",
wtmps->ut_user,
wtmps->ut_line,
wtmps->ut_pid,
wtmps->ut_type,
wtmps->ut_tv.tv_sec,
wtmps->ut_host
);
}
}
- Tags:
- getuts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2005 03:29 AM
тАО07-19-2005 03:29 AM