- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- /var/adm/lastlog size?
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
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
тАО08-20-2007 10:56 PM
тАО08-20-2007 10:56 PM
ralf
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 04:32 PM
тАО08-21-2007 04:32 PM
Solutionfile?
Knowing nothing, I'd guess that "lastlog"
contains a 292-byte record for each UID
(who has ever logged in), addressed by UID*
292. (So root's entry is at byte 0 = 0* 292,
and my entry is at byte 58400 = 200* 292.)
If you want a smaller file, choose smaller
numbers for UIDs.
The "lastlog" data structure is defined in
/usr/include/lastlog.h, and the size macros
are defined in /usr/include/utmp_common.h.
4+ 32+ 256 = 292. My "lastlog" file has only
two entries, (root = 0, and me = 200), so
it's pretty easy to see the pattern here:
urtx# od -x /usr/adm/lastlog
0000000 badf 46cb 7470 2f73 0030 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000040 0000 0000 6c61 2e70 6e61 6974 6f6e 6564
0000060 6f2e 6772 0000 0000 0000 0000 0000 0000
0000100 0000 0000 0000 0000 0000 0000 0000 0000
*
0162040 6292 466c 7470 2f73 0031 0000 0000 0000
0162060 0000 0000 0000 0000 0000 0000 0000 0000
0162100 0000 0000 6c61 2e70 6e61 6974 6f6e 6564
0162120 6f2e 6772 0000 0000 0000 0000 0000 0000
0162140 0000 0000 0000 0000 0000 0000 0000 0000
*
0162504
urtx# ls -lL /usr/adm/lastlog
-rw-r--r-- 1 root adm 58692 Aug 21 23:26 /usr/adm/lastlog
note that 201* 292 = 58692 (= 0o162504).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 08:12 PM
тАО08-21-2007 08:12 PM
Re: /var/adm/lastlog size?
On a clustered system, /var/adm/lastlog should be a CDSL (cluster dependant symbolic link). If it's the same size on more than one node, that implies that the CDSL has been broken. Check with ls -l. You should see it pointing to something like:
../cluster/members/{memb}/adm/lastlog
Hope this helps,
Regards,
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2007 09:40 PM
тАО08-21-2007 09:40 PM
Re: /var/adm/lastlog size?
The reason for the question was that we inherited some smaller systems with these large files.
Ralf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2007 01:33 AM
тАО08-22-2007 01:33 AM
Re: /var/adm/lastlog size?
> one node, that implies that the CDSL has
> been broken. [...]
Or that all the systems have the same largest
UID.
> So the size is a multiple of 292 but not be
> a multiple of the highest existing UID.
Knowing nothing, I can't say, but someone
might have a round-up policy on that file
size. Interesting.
> [...] we inherited some smaller systems
> with these large files.
Shouldn't smaller systems have smaller
largest UIDs?
> [...] 292000000 bytes [...] 986578 as
> highest UID [...]
I'd say that that's big. Well, at least we
now know a good reason to use smaller UID
values. (Maybe it's a sparse file, so it's
not really as bad (large) as it looks?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2007 04:55 PM
тАО08-28-2007 04:55 PM
Re: /var/adm/lastlog size?
I have a doubt you said size would be uid*292+uid1*292.....
in your case root's uid was 0 and yours 200.
So size should be 0*292+200*292=58400
but ur file size is 58692(58400+262) ????
could you please explain this.
BR,
Kapil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2007 07:34 AM
тАО08-30-2007 07:34 AM
Re: /var/adm/lastlog size?
No, what I said was:
> Knowing nothing, I'd guess that "lastlog"
> contains a 292-byte record for each UID
> (who has ever logged in), addressed by UID*
> 292. (So root's entry is at byte 0 = 0* 292,
> and my entry is at byte 58400 = 200* 292.)
That is, the record for a UID _starts_ at
UID* 292. It _ends_ 291 bytes later. The
file _size_ is the number of records times
the size of a record, that is, (1+ max(UID))*
292 bytes.