Find - Large Files Lookup; Lsof - Open File Ownership; Mount - Partitions Read/Write Status - Alcatel-Lucent OpenTouch Troubleshooting Manual

Hide thumbs Also See for OpenTouch:
Table of Contents

Advertisement

Alcatel-Lucent OpenTouch R1.x Troubleshooting guide
Some of these files may still be in use, try lsof as root to check the command, PID and user owning the file.

20.1.3 find - Large files lookup

User: root
Command: find / –name "*.core" –print and find / -size +100M 2>/dev/null
The core files can be quite big and can be the root cause of a partition fill up. Those files can be deleted to
free some disk space. In case of crash, it is interesting to save those core files for further analysis by the
R&D teams. The second command lists files larger than 100 MB. Check "man find" for more options.
To delete the core files once they are saved on another media, run find / –name "*.core" –delete

20.1.4 lsof - Open file ownership

User: root
Command: lsof | grep <name of the file>
Sample output:
lsof | grep "/logs/ecs/traces.log"
java 29023 htuser 54w REG 253,1 427211 4358148 /logs/ecs/traces.log
Check the first three fields: Command, process id, user. You may look for the process id in the processes list
for more information. Normal users are htuser, vmuser and root. Once the process identified, check the trace
level and log files for anomalies.
Another use of lsof: Check the number of files or sockets opened by one single process (this number is
limited to 1024 when the process has been started by the "init" process with pid 1). This command takes a
long time to run and cannot be stopped easily so start it on a separate ssh session if possible:
# for pid in $(lsof | awk '{print $2;}' | sort -u); do cmd=$(lsof | grep -w $pid
| head -1 | awk '{print $1;}'); echo "Command $cmd pid $pid has $(lsof | grep -w
$pid | wc -l) open files"; done
Command init pid 1 has 2936 open files
Command watchdog/ pid 10 has 167 open files
Command postmaste pid 10141 has 52 open files
etc ...

20.1.5 mount - Partitions read/write status

User: htuser
Command: mount
Sample output:
mount
/dev/mapper/vg01-rootvol on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/vg01-logsvol on /logs type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mapper/vg01-_var_backupvol on /var/backup type ext3 (rw,acl)
/dev/mapper/vg01-_slidesvol on /slides type ext3 (rw,acl)
/dev/mapper/vg01-_var_applicative_data_vmsvol on /var/applicative_data/vms
type
ext3 (rw,acl)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Checks: For a given partition such as the Local Storage partition /var/applicative_data/vms, check the
presence in the list (if absent from the list, the partition is not mounted), the read/write status (rw is read and
write, ro is read only), the ACL option presence (needed for vmsuser and htuser simultaneous access). If the
TG0064
154/182
Ed.15 / June 2013

Advertisement

Table of Contents
loading

Table of Contents