KANTHI.IN

Lsof

Command:

lsof - list open files ( Very efficient tool useful in troubleshooting )

Catergory:

System Information

Common Usage:
$ lsof -i   (Show all connections)
Examples:

Show all connections with -i

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
root@konquer:~# lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
avahi-dae 804 avahi 13u IPv4 2938 0t0 UDP *:mdns
avahi-dae 804 avahi 14u IPv6 2939 0t0 UDP *:mdns
avahi-dae 804 avahi 15u IPv4 2940 0t0 UDP *:33395
avahi-dae 804 avahi 16u IPv6 2941 0t0 UDP *:48071
cupsd 1196 root 5u IPv6 11659 0t0 TCP ip6-localhost:ipp (LISTEN)
cupsd 1196 root 6u IPv4 11660 0t0 TCP localhost:ipp (LISTEN)
telepathy 4929 king 9u IPv4 110982 0t0 TCP king-linux-laptop.local:35274->jabber-01-01-snc2.facebook.com:xmpp-client (ESTABLISHED)
telepathy 4929 king 10u IPv4 109265 0t0 TCP king-linux-laptop.local:51476->hx-in-f125.1e100.net:xmpp-client (ESTABLISHED)
telepathy 4929 king 12u IPv4 179368 0t0 TCP king-linux-laptop.local:49840->hx-in-f125.1e100.net:xmpp-client (ESTABLISHED)
ssh 5917 king 3r IPv4 135938 0t0 TCP king-linux-laptop.local:38144->192.168.138.150:ssh (ESTABLISHED)
gvfsd-htt 6455 king 11u IPv4 175000 0t0 TCP king-linux-laptop.local:43917->papeda.canonical.com:https (CLOSE_WAIT)
gvfsd-htt 6455 king 12w IPv4 174965 0t0 TCP king-linux-laptop.local:40706->sumac.canonical.com:www (CLOSE_WAIT)
gvfsd-htt 6455 king 14u IPv4 175333 0t0 TCP king-linux-laptop.local:36664->sumac.canonical.com:https (CLOSE_WAIT)
gvfsd-htt 6455 king 23u IPv4 165093 0t0 TCP king-linux-laptop.local:48824->barbadine.canonical.com:www (CLOSE_WAIT)
gvfsd-htt 6455 king 24u IPv4 165064 0t0 TCP king-linux-laptop.local:47295->sumac.canonical.com:www (CLOSE_WAIT)

Show only TCP connections

1
2
3
4
5
6
7
root@konquer:~# lsof -iTCP
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
cupsd 1196 root 5u IPv6 11659 0t0 TCP ip6-localhost:ipp (LISTEN)
cupsd 1196 root 6u IPv4 11660 0t0 TCP localhost:ipp (LISTEN)
telepathy 4929 king 9u IPv4 110982 0t0 TCP king-linux-laptop.local:35274->jabber-01-01-snc2.facebook.com:xmpp-client (ESTABLISHED)
telepathy 4929 king 10u IPv4 109265 0t0 TCP king-linux-laptop.local:51476->hx-in-f125.1e100.net:xmpp-client (ESTABLISHED)
telepathy 4929 king 12u IPv4 179368 0t0 TCP king-linux-laptop.local:49840->hx-in-f125.1e100.net:xmpp-client (ESTABLISHED)

-i :port show all networking related to a given port

1
2
3
root@konquer:~# lsof -i :22
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ssh 5917 king 3r IPv4 135938 0t0 TCP king-linux-laptop.local:38144->192.168.138.150:ssh (ESTABLISHED)

To show connections to a specific host, use @host

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
root@konquer:~# lsof -i@192.168.138.150
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ssh 5917 king 3r IPv4 135938 0t0 TCP king-linux-laptop.local:38144->192.168.138.150:ssh (ESTABLISHED)
</code></pre>
<p>```
Show the connections based on the host and port using @host:port</p>
<p>```sh</p>
<pre><code>root@konquer:~# lsof -i@192.168.138.150:22
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ssh 5917 king 3r IPv4 135938 0t0 TCP king-linux-laptop.local:38144->192.168.138.150:ssh (ESTABLISHED)
</code></pre>
<p>```
Grepping for "LISTEN" show what ports your system is waiting for connections on</p>
<p>```sh</p>
<pre><code>root@knoquer:~# lsof -i| grep LISTEN
apache2 997 root 4u IPv6 8050 0t0 TCP *:www (LISTEN)
apache2 1002 www-data 4u IPv6 8050 0t0 TCP *:www (LISTEN)
apache2 1004 www-data 4u IPv6 8050 0t0 TCP *:www (LISTEN)
cupsd 1301 root 5u IPv6 11325 0t0 TCP ip6-localhost:ipp (LISTEN)
cupsd 1301 root 6u IPv4 11326 0t0 TCP localhost:ipp (LISTEN)
dropbox 1609 king 30u IPv4 19374 0t0 TCP *:17500 (LISTEN)
</code></pre>
<p>```
Grepping for "ESTABLISHED" shows current active connections</p>
<p>```sh</p>
<pre><code>root@knoquer:~# lsof -i| grep ESTABLISHED
dropbox 1609 king 24u IPv4 20195 0t0 TCP king-linux-laptop.local:36365->208.43.202.2-static.reverse.softlayer.com:www (ESTABLISHED)
dropbox 1609 king 31u IPv4 28999 0t0 TCP king-linux-laptop.local:33736->ec2-184-72-255-170.compute-1.amazonaws.com:https (ESTABLISHED)
chrome 1870 king 93u IPv4 19980 0t0 TCP king-linux-laptop.local:49025->hx-in-f125.1e100.net:xmpp-client (ESTABLISHED)
ubuntuone 2058 king 38u IPv4 20450 0t0 TCP king-linux-laptop.local:56587->ec2-174-129-241-144.compute-1.amazonaws.com:https (ESTABLISHED)
firefox-b 2339 king 34r IPv4 34002 0t0 TCP king-linux-laptop.local:45705->nx-in-f102.1e100.net:www (ESTABLISHED)
firefox-b 2339 king 48u IPv4 34005 0t0 TCP king-linux-laptop.local:39787->nx-in-f113.1e100.net:www (ESTABLISHED)

To Show what a given user has open using -u

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
root@knoquer:~# lsof -u king
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gnome-key 1462 king cwd DIR 8,7 4096 2 /
gnome-key 1462 king rtd DIR 8,7 4096 2 /
gnome-key 1462 king txt REG 8,7 935600 2752970 /usr/bin/gnome-keyring-daemon
gnome-key 1462 king mem REG 8,7 31416 2758308 /usr/lib/gio/modules/libdconfsettings.so
gnome-key 1462 king mem REG 8,7 51728 3149596 /lib/x86_64-linux-gnu/libnss_files-2.13.so
gnome-key 1462 king mem REG 8,7 47680 3149600 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
gnome-key 1462 king mem REG 8,7 97248 3149590 /lib/x86_64-linux-gnu/libnsl-2.13.so
gnome-key 1462 king mem REG 8,7 35712 3149592 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
gnome-key 1462 king mem REG 8,7 5205824 2759890 /usr/lib/locale/locale-archive
gnome-key 1462 king mem REG 8,7 14280 3149584 /lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
gnome-key 1462 king mem REG 8,7 117544 3149621 /lib/x86_64-linux-gnu/libselinux.so.1
gnome-key 1462 king mem REG 8,7 96816 3149633 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
gnome-key 1462 king mem REG 8,7 101192 3149617 /lib/x86_64-linux-gnu/libresolv-2.13.so
gnome-key 1462 king mem REG 8,7 31752 3149619 /lib/x86_64-linux-gnu/librt-2.13.so
gnome-key 1462 king mem REG 8,7 243800 3149612 /lib/x86_64-linux-gnu/libpcre.so.3.12.1
gnome-key 1462 king mem REG 8,7 14696 3149560 /lib/x86_64-linux-gnu/libdl-2.13.so
gnome-key 1462 king mem REG 8,7 14472 2761342 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.2800.5
gnome-key 1462 king mem REG 8,7 1638120 3149550 /lib/x86_64-linux-gnu/libc-2.13.so
gnome-key 1462 king mem REG 8,7 975080 3149582 /lib/x86_64-linux-gnu/libglib-2.0.so.0.2800.5
gnome-key 1462 king mem REG 8,7 18824 2761356 /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0.2800.5
gnome-key 1462 king mem REG 8,7 327048 2761350 /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.2800.5
gnome-key 1462 king mem REG 8,7 499320 3149580 /lib/x86_64-linux-gnu/libgcrypt.so.11.6.0

See what files and network connections a command is using with -c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
root@knoquer:~# lsof -c rsyslog
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
rsyslogd 769 syslog cwd DIR 8,7 4096 2 /
rsyslogd 769 syslog rtd DIR 8,7 4096 2 /
rsyslogd 769 syslog txt REG 8,7 331192 2761619 /usr/sbin/rsyslogd
rsyslogd 769 syslog mem REG 8,7 88384 3146567 /lib/x86_64-linux-gnu/libgcc_s.so.1
rsyslogd 769 syslog mem REG 8,7 47680 3149600 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
rsyslogd 769 syslog mem REG 8,7 97248 3149590 /lib/x86_64-linux-gnu/libnsl-2.13.so
rsyslogd 769 syslog mem REG 8,7 35712 3149592 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
rsyslogd 769 syslog mem REG 8,7 23544 2760768 /usr/lib/rsyslog/imklog.so
rsyslogd 769 syslog mem REG 8,7 15312 2760772 /usr/lib/rsyslog/imuxsock.so
rsyslogd 769 syslog mem REG 8,7 51728 3149596 /lib/x86_64-linux-gnu/libnss_files-2.13.so
rsyslogd 769 syslog mem REG 8,7 23264 2760773 /usr/lib/rsyslog/lmnet.so
rsyslogd 769 syslog mem REG 8,7 1638120 3149550 /lib/x86_64-linux-gnu/libc-2.13.so
rsyslogd 769 syslog mem REG 8,7 31752 3149619 /lib/x86_64-linux-gnu/librt-2.13.so
rsyslogd 769 syslog mem REG 8,7 14696 3149560 /lib/x86_64-linux-gnu/libdl-2.13.so
rsyslogd 769 syslog mem REG 8,7 140254 3149615 /lib/x86_64-linux-gnu/libpthread-2.13.so
rsyslogd 769 syslog mem REG 8,7 96816 3149633 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
rsyslogd 769 syslog mem REG 8,7 141088 3149537 /lib/x86_64-linux-gnu/ld-2.13.so
rsyslogd 769 syslog 0u unix 0xffff88010fa50000 0t0 2735 /dev/log
rsyslogd 769 syslog 1w REG 8,7 66055 2622220 /var/log/auth.log
rsyslogd 769 syslog 3r REG 0,3 0 4026532013 /proc/kmsg
rsyslogd 769 syslog 4w REG 8,7 151015 2622365 /var/log/syslog
rsyslogd 769 syslog 5w REG 8,7 1632914 2622366 /var/log/kern.log

Pointing to a file shows what’s interacting with that file

1
2
3
root@knoquer:~# lsof /etc/passwd
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
applet.py 2029 king 12w REG 8,7 1524 1966275 /etc/passwd

The -p switch lets you see what a given process ID has open, which is good for learning more about unknown processes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
root@knoquer:~# lsof -p 2426
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
su 2426 root cwd DIR 8,7 4096 1179649 /root
su 2426 root rtd DIR 8,7 4096 2 /
su 2426 root txt REG 8,7 36832 524418 /bin/su
su 2426 root mem REG 8,7 43472 3149490 /lib/security/pam_gnome_keyring.so
su 2426 root mem REG 8,7 14472 2756270 /usr/lib/libck-connector.so.0.0.0
su 2426 root mem REG 8,7 31752 3149619 /lib/x86_64-linux-gnu/librt-2.13.so
su 2426 root mem REG 8,7 140254 3149615 /lib/x86_64-linux-gnu/libpthread-2.13.so
su 2426 root mem REG 8,7 277304 3149559 /lib/x86_64-linux-gnu/libdbus-1.so.3.5.4
su 2426 root mem REG 8,7 10296 3149488 /lib/security/pam_ck_connector.so
su 2426 root mem REG 8,7 6040 3278142 /lib/x86_64-linux-gnu/security/pam_permit.so
su 2426 root mem REG 8,7 5944 3278122 /lib/x86_64-linux-gnu/security/pam_deny.so
su 2426 root mem REG 8,7 43296 3149556 /lib/x86_64-linux-gnu/libcrypt-2.13.so
su 2426 root mem REG 8,7 56088 3278157 /lib/x86_64-linux-gnu/security/pam_unix.so
su 2426 root mem REG 8,7 10240 3278137 /lib/x86_64-linux-gnu/security/pam_mail.so
su 2426 root mem REG 8,7 14392 3278124 /lib/x86_64-linux-gnu/security/pam_env.so
su 2426 root mem REG 8,7 117544 3149621 /lib/x86_64-linux-gnu/libselinux.so.1
su 2426 root mem REG 8,7 6056 3278145 /lib/x86_64-linux-gnu/security/pam_rootok.so
su 2426 root mem REG 8,7 51728 3149596 /lib/x86_64-linux-gnu/libnss_files-2.13.so
su 2426 root mem REG 8,7 47680 3149600 /lib/x86_64-linux-gnu/libnss_nis-2.13.so
su 2426 root mem REG 8,7 97248 3149590 /lib/x86_64-linux-gnu/libnsl-2.13.so
su 2426 root mem REG 8,7 35712 3149592 /lib/x86_64-linux-gnu/libnss_compat-2.13.so
su 2426 root mem REG 8,7 5205824 2759890 /usr/lib/locale/locale-archive
su 2426 root mem REG 8,7 14696 3149560 /lib/x86_64-linux-gnu/libdl-2.13.so
su 2426 root mem REG 8,7 1638120 3149550 /lib/x86_64-linux-gnu/libc-2.13.so
su 2426 root mem REG 8,7 14528 3149607 /lib/x86_64-linux-gnu/libpam_misc.so.0.82.0
su 2426 root mem REG 8,7 51712 3149605 /lib/x86_64-linux-gnu/libpam.so.0.82.3
su 2426 root mem REG 8,7 141088 3149537 /lib/x86_64-linux-gnu/ld-2.13.so
su 2426 root 0u CHR 136,0 0t0 3 /dev/pts/0
su 2426 root 1u CHR 136,0 0t0 3 /dev/pts/0
su 2426 root 2u CHR 136,0 0t0 3 /dev/pts/0
su 2426 root 4u unix 0xffff8800a543fb80 0t0 32621 socket

The -t option returns just a PID

1
2
3
4
root@knoquer:~# lsof -t -c apache2
997
10001002
1004

Using-a allows you to combine search terms, so the query below says, “show me everything running as king connected to ip xx.xx.xx.xx”

1
2
3
root@knoquer:~# lsof -a -u king -i @208.43.202.2
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dropbox 1609 king 24u IPv4 20195 0t0 TCP king-linux-laptop.local:36365->208.43.202.2-static.reverse.softlayer.com:www (ESTABLISHED)

Uptime

Command:

uptime - Reports how long the system has been running

Catergory:

System Information

Common Usage:
$ uptime
Examples:

uptime gives a one line display of the following information.

  • The current time
  • how long the system has been running
  • how many users are
  • currently logged on, and
  • the system load averages for the past 1, 5,and 15 minutes.

This is the same information contained in the header line displayed by command w(1).

1
2
king@konquer:~$ uptime
14:02:52 up 3:30, 2 users, load average: 1.00, 1.02, 1.05

Uname

Command:

uname - print system information

Catergory:

System Information

Common Usage:
$ uname -a 

$ uname -r
Examples:
1
2
king@konquer:~$ uname -a
Linux konquer 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011 x86_64 GNU/Linux
1
2
king@konquer:~$ uname -s
Linux
1
2
king@konquer:~$ uname -n
konquer
1
2
king@konquer:~$ uname -r
2.6.35-28-generic
1
2
king@konquer:~$ uname -v
#49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011
1
2
king@konquer:~$ uname -m
x86_64
1
2
king@konquer:~$ uname -o
GNU/Linux

Tty

Command:

tty - Print the file name of the terminal connected to standard input

Catergory:

System Information

Common Usage:
$ tty
Examples:
1
2
king@konquer:~$ tty
/dev/pts/1

Runlevel

Command:

runlevel - Find the current and previous system runlevel

Catergory:

System Information

Common Usage:
$ runlevel
Examples:
1
2
king@konquer:~$ runlevel
N 2

Procinfo

Command:

procinfo - gathers some system data from the /proc directory and prints it nicely formatted on the standard output device

Catergory:

System Information

Common Usage:
$ procinfo 
Examples:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
king@konquer:~$ procinfo
Memory: Total Used Free Buffers
RAM: 3852436 3070012 782424 384820
Swap: 3905532 0 3905532
Bootup: Wed Apr 13 10:32:02 2011 Load average: 1.10 1.05 1.06 1/513 12278
user : 00:27:37.28 2.8% page in : 1024571
nice : 00:00:26.31 0.0% page out: 565640
system: 00:07:59.99 0.8% page act: 744498
IOwait: 00:05:33.75 0.6% page dea: 0
hw irq: 00:00:00.00 0.0% page flt: 11330417
sw irq: 00:00:09.11 0.0% swap in : 0
idle : 15:29:00.62 95.7% swap out: 0
uptime: 03:58:09.06 context : 25909993
irq 0: 74 timer irq 17: 32 ehci_hcd:usb2, et
irq 1: 19719 i8042 irq 18: 0 yenta, ips
irq 8: 1 rtc0 irq 19: 148012 ata_piix, ata_pii
irq 9: 17433 acpi irq 45: 407560 i915
irq 12: 403645 i8042 irq 46: 124251 eth0
irq 16: 80 ehci_hcd:usb1, fi irq 47: 1391 hda_intel
sda 32103r 39970w
eth0 TX 8.47MiB RX 63.36MiB lo TX 480.00B RX 480.00B
eth1 TX 0.00B RX 0.00B vboxnet0 TX 0.00B RX 0.00B

Mount

Command:

mount - mount a filesystem

mount and umount maintain a list of currently mounted filesystems in the file /etc/mtab.
If no arguments are given to mount, this list is printed.

Catergory:

System Information

Common Usage:
$ mount
Examples:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
root@konquer:~# mount
/dev/sda7 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sda6 on /king type ext4 (rw,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/dev/sda1 on /media/C8BCA0D1BCA0BAF8 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda2 on /media/Data type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
gvfs-fuse-daemon on /home/king/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=king)

Lsusb

Command:

lsusb - utility for displaying information about USB buses in the system and the devices connected to them.

Catergory:

System Information

Common Usage:
$ lsusb
Examples:
1
2
3
4
5
6
king@konquer:~$ lsusb
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0c45:6419 Microdia
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
1
2
3
4
5
6
7
king@konquer:~$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
|__ Port 4: Dev 3, If 0, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M
|__ Port 4: Dev 3, If 1, Class='bInterfaceClass 0x0e not yet handled', Driver=uvcvideo, 480M

Lspci

Command:

lspci - utility for displaying information about PCI buses in the system and devices connected to them

Catergory:

System Information

Common Usage:
$ lspci

$ lspci -t (With -t option you can see PCI layout in a tree format)

$ lspci -tv (use -v option with -t to get detailed information )
Examples:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
king@konquer:~$ lspci
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)
00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 05)
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
00:1f.2 IDE interface: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA IDE Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
00:1f.5 IDE interface: Intel Corporation 5 Series/3400 Series Chipset 2 port SATA IDE Controller (rev 05)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
02:00.0 Network controller: Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01)
03:00.0 CardBus bridge: Ricoh Co Ltd Device e476 (rev 02)
03:00.1 SD Host controller: Ricoh Co Ltd Device e822 (rev 03)
03:00.4 FireWire (IEEE 1394): Ricoh Co Ltd Device e832 (rev 03)
0b:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761e Gigabit Ethernet PCIe (rev 10)
3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
king@konquer:~$ lspci -t
-+-[0000:3f]-+-00.0
| +-00.1
| +-02.0
| +-02.1
| +-02.2
| \-02.3
\-[0000:00]-+-00.0
+-02.0
+-16.0
+-1a.0
+-1b.0
+-1c.0-[01]--
+-1c.1-[02]----00.0
+-1c.2-[03-04]--+-00.0
| +-00.1
| \-00.4
+-1c.3-[05-0a]--
+-1c.5-[0b]----00.0
+-1d.0
+-1e.0-[0c]--
+-1f.0
+-1f.2
+-1f.3
+-1f.5
\-1f.6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
king@konquer:~$ lspci -tv
-+-[0000:3f]-+-00.0 Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers
| +-00.1 Intel Corporation Core Processor QuickPath Architecture System Address Decoder
| +-02.0 Intel Corporation Core Processor QPI Link 0
| +-02.1 Intel Corporation Core Processor QPI Physical 0
| +-02.2 Intel Corporation Core Processor Reserved
| \-02.3 Intel Corporation Core Processor Reserved
\-[0000:00]-+-00.0 Intel Corporation Core Processor DRAM Controller
+-02.0 Intel Corporation Core Processor Integrated Graphics Controller
+-16.0 Intel Corporation 5 Series/3400 Series Chipset HECI Controller
+-1a.0 Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
+-1b.0 Intel Corporation 5 Series/3400 Series Chipset High Definition Audio
+-1c.0-[01]--
+-1c.1-[02]----00.0 Broadcom Corporation BCM43224 802.11a/b/g/n
+-1c.2-[03-04]--+-00.0 Ricoh Co Ltd Device e476
| +-00.1 Ricoh Co Ltd Device e822
| \-00.4 Ricoh Co Ltd Device e832
+-1c.3-[05-0a]--
+-1c.5-[0b]----00.0 Broadcom Corporation NetXtreme BCM5761e Gigabit Ethernet PCIe
+-1d.0 Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
+-1e.0-[0c]--
+-1f.0 Intel Corporation Mobile 5 Series Chipset LPC Interface Controller
+-1f.2 Intel Corporation 5 Series/3400 Series Chipset 4 port SATA IDE Controller
+-1f.3 Intel Corporation 5 Series/3400 Series Chipset SMBus Controller
+-1f.5 Intel Corporation 5 Series/3400 Series Chipset 2 port SATA IDE Controller
\-1f.6 Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem

Lsmod

Command:

lsmod - prints the contents of the /proc/modules file. It shows which loadable kernel modules are currently loaded.

Catergory:

System Information

Common Usage:
# lsmod
Examples:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
root@konquer:~# lsmod
Module Size Used by
usb_storage 53538 0
uas 17996 0
snd_hda_codec_hdmi 28103 1
snd_hda_codec_idt 71137 1
rfcomm 47694 8
binfmt_misc 17565 1
sco 18131 2
bnep 18308 2
l2cap 53570 16 rfcomm,bnep
wl 2568244 0
lib80211 14991 1 wl
arc4 12529 2
snd_hda_intel 33211 2
snd_hda_codec 103804 3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
snd_hwdep 13604 1 snd_hda_codec
snd_pcm 96625 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_seq_midi 13324 0
snd_rawmidi 30486 1 snd_seq_midi
snd_seq_midi_event 14899 1 snd_seq_midi
brcm80211 748941 0
snd_seq 61621 2 snd_seq_midi,snd_seq_midi_event
i915 514985 7
snd_timer 29602 2 snd_pcm,snd_seq
snd_seq_device 14462 3 snd_seq_midi,snd_rawmidi,snd_seq
ppdev 17113 0
dell_wmi 12681 0
mac80211 294370 1 brcm80211
sparse_keymap 13898 1 dell_wmi
pcmcia 49166 0
dell_laptop 13827 0
dcdbas 14438 1 dell_laptop
psmouse 73535 0
cfg80211 178528 2 brcm80211,mac80211
snd 67382 14 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
btusb 18600 2
drm_kms_helper 42136 1 i915
uvcvideo 72195 0
drm 227495 3 i915,drm_kms_helper
intel_ips 18097 0
bluetooth 72448 9 rfcomm,sco,bnep,l2cap,btusb
serio_raw 13166 0
videodev 82052 1 uvcvideo
v4l2_compat_ioctl32 17078 1 videodev
parport_pc 36959 0
soundcore 12680 1 snd
yenta_socket 27846 0
snd_page_alloc 18529 2 snd_hda_intel,snd_pcm
i2c_algo_bit 13400 1 i915
pcmcia_rsrc 18372 1 yenta_socket
pcmcia_core 22569 3 pcmcia,yenta_socket,pcmcia_rsrc
video 19438 1 i915
lp 17825 0
parport 46458 3 ppdev,parport_pc,lp
tg3 141750 0
firewire_ohci 40370 0
sdhci_pci 13989 0
firewire_core 62646 1 firewire_ohci
sdhci 27387 1 sdhci_pci
crc_itu_t 12707 1 firewire_core