Link to home
Start Free TrialLog in
Avatar of hvanderw
hvanderwFlag for United States of America

asked on

rookie HP-UX admin - df shows /var with 0 blcoks free and I have deleted MANY files to free up sapce but it still shows 0 what am I doing worng ?

/four/realworld      (scosrv:/u/hpin      ): 29547802 blocks        -1 i-nodes
/cdrom               (/dev/dsk/c1t2d0     ):        0 blocks         0 i-nodes
/four/db             (/dev/vg02/db        ):  2412160 blocks    672568 i-nodes
/four/logs           (/dev/vg02/logs      ):   606794 blocks     56663 i-nodes
/four                (/dev/vg02/four      ):   236878 blocks    137563 i-nodes
/home                (/dev/vg00/lvol4     ):    63982 blocks      6035 i-nodes
/opt                 (/dev/vg00/lvol5     ):    74876 blocks     39486 i-nodes
/tm                  (/dev/vg02/hdlltm    ): 15706146 blocks   1956904 i-nodes
/tmp                 (/dev/vg00/lvol6     ):   192514 blocks     69033 i-nodes
/usr                 (/dev/vg00/lvol7     ):   139592 blocks     64175 i-nodes
/var                 (/dev/vg00/lvol8     ):        0 blocks     90308 i-nodes
/stand               (/dev/vg00/lvol1     ):    56784 blocks      7659 i-nodes
/                    (/dev/vg00/lvol3
I have cleaned up the /var/tmp directory and others but still shows the above
ASKER CERTIFIED SOLUTION
Avatar of tfewster
tfewster
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hvanderw

ASKER

# du -sk /var
183737  /var

df
/var                 (/dev/vg00/lvol8     ):        0 blocks     90281 i-nodes
/stand               (/dev/vg00/lvol1     ):    56784 blocks      7659 i-nodes

bdf
/dev/vg00/lvol8     203517  183738       0  100% /var
/dev/vg00/lvol7     516475  395031   69796   85% /usr

I had rebooted the system last night before cleaning up the directories


so which of these can be killed ??

# fuser -uc /var
/var:      325o(root)     575co(root)     303o(root)     328o(root)     351o(roo
t)     352o(root)     517co(root)     447c(root)     412o(root)     418o(root)  
   525o(root)     571co(root)     608o(root)     567o(root)     625o(root)     6
83o(root)

# Oct 25 06:57:45 altlsrv last message repeated 7 times
ps -fp 325o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   325     1  0 15:59:43 ?         0:01 /usr/sbin/syslogd -D
# Oct 25 06:58:00 altlsrv sendmail[447]: [NOQUEUE]: low on space (have 0, SMTP-D
AEMON needs 101 in /var/spool/mqueue)
ps -fp 575co
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   575     1  0 16:00:26 ?         0:00 /usr/sbin/cron
# ps -fp 303o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   303     1  0 15:59:38 ?         0:00 /usr/sbin/swagentd
# ps -fp 328o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   328     1  0 15:59:43 ?         0:00 /usr/sbin/ptydaemon
# ps -fp 351o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   351     1  0 15:59:48 ?         0:00 /usr/lbin/ntl_reader 0 1 1 1 100
0 /var/adm/nettl /var/adm/co
# ps -fp 352o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   352   351  0 15:59:48 ?         0:10 /usr/sbin/netfmt -C -F -f /var/a
dm/nettl.LOG00 -c /var/adm/c
# ps -fp 517co
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   517     1  0 16:00:07 ?         0:11 /opt/dce/sbin/rpcd
# ps -fp 447c
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   447     1  0 15:59:54 ?         0:02 sendmail: rejecting connections:
 min free: 100
# ps -fp 412o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   412     1  0 15:59:52 ?         0:00 /usr/sbin/rpc.lockd
# ps -fp 418o
     UID   PID  PPID  C    STIME TTY       TIME COMMAND
    root   418     1  0 15:59:53 ?         0:00 /usr/sbin/automount -f /etc/auto
_master

after re-booting a 2nd time
the system now shows plenty of disk space avail  in /var
Thanks for the help and the commands !
> so which of these can be killed ??

Of those processes, ntl_reader and netfmt are not essential to the running of a system and could possibly have large log files.  It's unusual to have them starting automatically at boot, but maybe you need to monitor your network.

sendmail tends to have lots of small files, and wouldn't have them all locked anyway

syslog files can get huge, but HP-UX  rotates them at boot time, so the older ones wouldn't be locked

swagentd is not esssential for day-to-day running and can have large log files, though I doubt that they are held open all the time.

Stopping any of the above would be fairly safe while you were investigating.

If /var fills up again, `cd /var` and do `du -sk *` to see which directories are large (before trying to delete anything, so the total should match up with `bdf /var`). cd into any large directories  and repeat the `du -sk *` to trace down the actual subdirectories and files that are causing the problem