1833130 Members
3370 Online
110051 Solutions
New Discussion

Re: /usr 98% full

 
SOLVED
Go to solution
Adrian Sobers2
Super Advisor

/usr 98% full

well you can see from the thread title, what the problem is. Is there anything in /usr that is a culprit for eating up space? I need to free space on /usr urgently.

Thanks for your help in advance. Attached is the output from bdf /usr

Cheers.
38 REPLIES 38
Steven E. Protter
Exalted Contributor
Solution

Re: /usr 98% full

Usually not.

/usr is where you install software.

The content is supposed to be static. I've run systems for months with /usr at 98% without any difficulties at all.

Variable output and logs are directed to /var

If this figure is changing without software instalaltions, then look for an application that is storing variable output in /usr

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dave Hutton
Honored Contributor

Re: /usr 98% full

I usually do du -sk * in your directory to see which directory is the largest. I then drill down until I find some files I know I can remove.

So
# cd /usr
# du -sk * | sort -An
0 adm
0 hpC2400
0 keysh
0 lost+found
0 mail
0 man
0 netls
0 news
0 openv
0 preserve
0 pub
0 spool
0 tftpdir
0 tmp
3 etc
15 TT_DB
40 examples
874 vue
1462 tsm
2862 old
4222 dmi
7855 include
7867 newconfig
8796 lbin
17092 ccs
23556 sam
32691 obam
33035 bin
44959 contrib
54400 share
57924 conf
67520 dt
85627 sbin
93439 local
570480 lib

I would then go in lib and do the same command until I've freed up enough space.
Pete Randall
Outstanding Contributor

Re: /usr 98% full

Adrian,

The bdf isn't all that helpful. You need to analyze what's filling it up. Run "du -sk /usr/* |sort -n". This will produce a listing of the files and directories under /usr from smallest to largest. If something immediately jumps out at you as being out of line, investigate it. If not, start looking at the largest areas by running "du -sk /usr/bigdir/* |sort -n" and keep drilling down until you find the culprit.


Pete

Pete
Deoncia Grayson_1
Honored Contributor

Re: /usr 98% full

You may want to find which files is utilizing the most space in /usr and which process is running that is writing information to that file.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Geoff Wild
Honored Contributor

Re: /usr 98% full

cd /usr
du -sk * |sort -n

Look at the largest - non mounted ones....

Keep drilling down the directories...

If room in the vg, if you have online jfs - you can extend on the fly,

lvextend -L 1572864 /dev/vg00/lvol7
fsadm -b 1572864M /usr

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Zinky
Honored Contributor

Re: /usr 98% full

Adrian,

I suspect you've a installed non-OS software in /usr that may be generating logs or temp files, etc. Do the following:

du -ax /usr|sort -nr|head 20

This will give you the biggest top 20 directories AND files.

If what you have is a large log file - DO NOT SIMPLY DELETE IT as it will not give you back space. Copy it to a temporary holding space COMPRESSED if it is a text file (file command). Do a :

cat /usr/somesoftware/biglogefile.txt|gzip>/temp_repo/biglogfile.txt.gz

Then you simply cp /dev/null /usr/somesoftware/biglogefile.txt


Hope this helps..
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Fred Ruffet
Honored Contributor

Re: /usr 98% full

1.2GB in /usr may be normal, depending on what products are installed on server. Do you see it grow, or this this just a fact that it's full.

You should just increase it. If you have OnlineJFS, This can be done without a reboot.

Please post output for "du -ks /usr/*".

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Zinky
Honored Contributor

Re: /usr 98% full

Adrian,

Correction on the head command -- there should be a -:

du -ax /usr|sort -nr|head -20


Note:

du -sk /usr/* will only show you directory sizes.

du -ax /usr WILL show you both directory sizes AND files. files -- because I suspect a growing log file on there.. (possibly /usr/vendor/autotree - if Autosys is installed... for example..)
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Pete Randall
Outstanding Contributor

Re: /usr 98% full

Well, Nelson, on *my* HP machines, du -sk gives results for both files and directories - are you sure you aren't confusing one of your Sun machines or something?


Pete

Pete
Adrian Sobers2
Super Advisor

Re: /usr 98% full

attached is the output from

du -ax /usr|sort -nr|head > big.txt


this means absolutely nothing to me, anyone care to explain exactly what I can do with this knowledge?
Pete Randall
Outstanding Contributor

Re: /usr 98% full

That's the problem with using du -ax piped to head - all we're seeing is that /usr/lib is the biggest directory under /usr - not exactly a surprise. Run "du -sk |sort -n" and post the last 20 lines or so.


Pete

Pete
Adrian Sobers2
Super Advisor

Re: /usr 98% full

attached is the output from the command:

du -ax /usr|sort -nr|head -20 > 20.txt
Pete Randall
Outstanding Contributor

Re: /usr 98% full

I also have to agree with Fred that this may be completely normal. I've got machines with /usr ranging from 1.08 to 1.22 GB. As long as it's not growing, this is probably OK, though you might want to enlarge it a little bit just so you don't keep scaring yourself everytime you run bdf.


Pete

Pete
Geoff Wild
Honored Contributor

Re: /usr 98% full

Thats showing you the top directorys in blocks. Add k for Kbytes:

du -akx /usr|sort -nr|head -20


Mine is:

1604952 /usr
522560 /usr/lib
268568 /usr/local
191288 /usr/ecc
191280 /usr/ecc/exec
164800 /usr/local/src
150240 /usr/lib/nls
118952 /usr/lib/X11
114568 /usr/sbin
102768 /usr/lib/nls/loc
95424 /usr/lib/X11/fonts
84072 /usr/dt
76368 /usr/share
75264 /usr/contrib
73584 /usr/lib/pa20_64
72080 /usr/lib/X11/fonts/TrueType
67600 /usr/conf
60872 /usr/sbin/stm
59864 /usr/share/man
51344 /usr/local/ps

My usr is 2 GB.

I would increase yours if possible.

You /usr/lib seems larger then normal - mine is 500 MB - yours is 700...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Zinky
Honored Contributor

Re: /usr 98% full

Adrian,

If your /usr has remained at or about 90-98% for sometime - then you probably have a STATIC /usr filesystem that you need not worry. BUT I am still worried you may have a log/output directory that generates small log files. Give us an output (complete) of du -sk /usr |sort -nr and let's see if you've non-OS/system subdirecotries underneath.

Pete,

du -sk /usr will summarize only at that level -- files and directories and will only show you large subdirectories.

du -ax will show you not only the biggest directories but also your culprit biggest files.

Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Fred Ruffet
Honored Contributor

Re: /usr 98% full

Maybe you have locales you don't need (I have this : "89194 /usr/lib/nls").

What is content of /usr/lib/nls/loc/pa20_64/locales.2 ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Adrian Sobers2
Super Advisor

Re: /usr 98% full

attached is output from du command.

ummm...*looking down sheepishly at floor* it dawned on me that this is probably because I installed the latest December Quality Packs yesterday.

I check the log book and /usr was at 85% before patch install and now it is 98%. We do not have Online JFS, so how should I go about extending /usr...indeed, SHOULD I extend /usr?



Pete Randall
Outstanding Contributor

Re: /usr 98% full

Adrian,

No points for this, please.


Nelson,

I guess it's a matter of preference:

# du -ax /usr|sort -nr|head
2155216 /usr
1144720 /usr/lib
347920 /usr/lib/nls
316512 /usr/lib/X11
272176 /usr/lib/X11/fonts
253872 /usr/lib/nls/loc
225264 /usr/lib/X11/fonts/TrueType
215872 /usr/sbin
170496 /usr/dt
156896 /usr/share

This seems to break down /usr/lib - I guess that's what you're saying.


# du -sk /usr/* |sort -nr |head
572360 /usr/lib
107936 /usr/sbin
85248 /usr/dt
78448 /usr/share
59520 /usr/conf
34184 /usr/contrib
33600 /usr/obam
29688 /usr/sam
26168 /usr/bin
14016 /usr/ccs

This summarizes /usr/lib and shows me more suspect top level directories which I can then manually drill down into.


Pete

Pete
Adrian Sobers2
Super Advisor

Re: /usr 98% full

attached is output from locales.2 directory that was asked about earlier. I do not think I need all these different locales. How do I go about removing unwanted locales? SAM? Would this free considerable space?

Geoff Wild
Honored Contributor

Re: /usr 98% full

Without online jfs - you will have to go to single user mode - outage for you - and umount /usr, lvextend it, then extendfs it.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Fred Ruffet
Honored Contributor

Re: /usr 98% full

Difference seems to come from your utf8 files I don't have. They are *very* big. You may need utf8 encoding, but maybe not for all that locales.

What gives this commands :
swlist -l fileset | grep "^ *International"
swlist -l fileset | grep -i utf8

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Adrian Sobers2
Super Advisor

Re: /usr 98% full

I just want to double check on steps I would need to take to extend /usr

========================
BOOT TO SINGLE USER MODE
========================

# shutdown -r now

(interrupt boot sequence from keyboard(

Enter Command> boot pri isl

ISL > boot hpux -is

# /sbin/lvextend -L 1572864 /dev/vg00/lvol7
# /sbin/fsadm -b 1572864M /usr

# /sbin/mount -a
# /sbin/shutdown -r -y now

Questions...

I would have previously done

# /sbin/lvextend -L 1572864 /dev/vg00/lvol7
# /sbin/extendfs - F vxfs /dev/vg00/rlvol7

Why is it

# /sbin/fsadm -b 1572864M /usr

instead of

# /sbin/extendfs - F vxfs /dev/vg00/rlvol7
Pete Randall
Outstanding Contributor

Re: /usr 98% full

You could try using swremove to get rid of unwanted languages: swremove -> HPUXBase64 -> International. That may help.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: /usr 98% full



# /sbin/fsadm -b 1572864M /usr

would be used if you had OnlineJFS You need to go back to your previous method:

# /sbin/lvextend -L 1572864 /dev/vg00/lvol7
# /sbin/extendfs - F vxfs /dev/vg00/rlvol7



Pete

Pete