Operating System - HP-UX
1832856 Members
3263 Online
110047 Solutions
New Discussion

Re: /usr/adm/ directory ..

 
SOLVED
Go to solution
someone_4
Honored Contributor

/usr/adm/ directory ..

Hey everyone

I had a full filesytem issue and noticed that that I have a /usr/adm directory. It look like /var/adm and I had a huge wtmp file in /usr/adm

40034820 Apr 15 16:04 wtmp

Now I have realized that /usr/adm is linked to /var/adm. But the changes that were made in /var/adm did not take for /usr/adm since /var/adm is just fine.

Can someone tell me a little more about why /usr/adm is linked to /var/adm.

And why the link seems to be broken and how to fix it.

ll -d /usr/adm
lrwxr-xr-t 1 root sys 8 Nov 20 2000 /usr/adm -> /var/adm

bdf still shows to be 100% even after moving the huge wtmp file that should have freed up some space.

Any ideas on that?
Besides rebooting the server to kill runaways running from /usr. If I have to reboot so be it.

Thanks,
Richard
4 REPLIES 4
someone_4
Honored Contributor

Re: /usr/adm/ directory ..

I forget a link wont fill up a filesystem. Ignore my comment about /usr being 100% but i would like to know why it is linked.

Richard
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: /usr/adm/ directory ..

Mainly for historical reasons. Prior to SVR4, the default location for those files was /usr/adm and temp file were place in /usr/tmp. In newer OS releases, /var is the preferred location but the symbolic links are retained so that old programs and scripts will continue to work.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: /usr/adm/ directory ..

Hi Richard:

You might find this "old" paper provides some more insight. History, after all, is a valuable teacher. The white paper appeared around the introduction of HP-UX 10.x:

http://www.software.hp.com/HPUX-RDMP/history/slide2.html

http://docs.hp.com/hpux/onlinedocs/5963-8942/5963-8942.html

As always, it is better (both for speed and for future compatability) to use a direct reference rather than a transition link.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: /usr/adm/ directory ..

There are hundreds of transition links which are provided to keep very old software running correctly. There is no /bin or /lib directory either (just like Solaris)...hasn't been for 8 years in HP-UX. Instead (because programmers don't fix everything), a link is provided to keep the old software functional.

Note that transition links should NOT be relied on--they may disappear in the future. Or a sysadmin might remove them with the tlremove command.

The reason that wtmp did not shrink was that it was still open by several processes. Since this file is constantly growing, you need to copy it if needed for record-keeping, then aero out the size of the file with something like:

cat /dev/null > /var/adm/wtmp

There are many other files in /var/adm that will grow without bounds. Use this command to sort the files by size:

ls -l | sort -rnk5 | more

Use cron to automatically trim logfile.


Bill Hassell, sysadmin