System information
System Monitoring Utilities 43
File: "/etc/profile"
ID: d4fb76e70b4d1746 Namelen: 255 Type: ext2/ext3
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 2581445 Free: 1717327 Available: 1586197
Inodes: Total: 655776 Free: 490312
2.9 User Information
2.9.1 User Accessing Files: fuser
It can be useful to determine what processes or users are currently accessing certain
files. Suppose, for example, you want to unmount a file system mounted at /mnt.
umount returns "device is busy." The command fuser can then be used to deter-
mine what processes are accessing the device:
tux@mercury:~> fuser -v /mnt/*
USER PID ACCESS COMMAND
/mnt/notes.txt tux 26597 f.... less
Following termination of the less process, which was running on another terminal,
the file system can successfully be unmounted. When used with -k option, fuser
will kill processes accessing the file as well.
2.9.2 Who Is Doing What: w
With the command w, find out who is logged onto the system and what each user is
doing. For example:
tux@mercury:~> w
14:58:43 up 1 day, 1:21, 2 users, load average: 0.00, 0.00, 0.00
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
tux :0 12:25 ?xdm? 1:23 0.12s /bin/sh /usr/bin/startkde
root pts/4 14:13 0.00s 0.06s 0.00s w
If any users of other systems have logged in remotely, the parameter -f shows the
computers from which they have established the connection.
2.10 Time and Date