Поиск по блогу

вторник, 8 апреля 2014 г.

Наконец Kali стал притормаживать, первой попалась статья про файл подкачки... но здесь команды bash.

Первой попалась статья "Файл подкачки: swap-файл и swap-раздел в Linux"... Не уверен, что создание файла подкачки улучшит ситуацию (поскольку гружусь с флешки), но решать проблему надо. Потому здесь пробуем команды bash для мониторинга параметров системы.
В этом посте я хотел обозначить проблему и сохранить ссылки для дальнейшей работы. Однако, начинать пришлось с изучения команд сетевого управления консоли. Задача эта инфраструктурная. И я не знаю, как её решать... Если исходить из основного "японского" (p2m) принципа ПРИОРИТЕТА ДОЛГОСРОЧНЫХ ЦЕЛЕЙ НАД КРАТКОСРОЧНЫМИ, то надо сначала усвоить методы диагностики сети из командной строки.
Статья "Файл подкачки: ..." понравилась, многое оттуда надо попробовать, потому пока ссылку оставим здесь

Пробуем команды из справочника С.Граннемана.

In []:
ps aux       #- от root выведет все процессы (пример ниже)
ps axjf      #
ps U         #
kill hup|term|kill -1|-15|19 <>
top          #

lsof         #
lsof -u      #
lsof [файл]  # кто использует [файл] (только root, пример ниже)
lsof -с [программа]  #

free

df
du
du -s
In [1]:
# все процессы, выполняемые в текущий момент
!ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root         1  0.0  0.0   2284   748 ?        Ss   09:22   0:01 init [2]       

root         2  0.0  0.0      0     0 ?        S    09:22   0:00 [kthreadd]

root         3  0.0  0.0      0     0 ?        S    09:22   0:01 [ksoftirqd/0]

root         5  0.0  0.0      0     0 ?        S<   09:22   0:00 [kworker/0:0H]

root         7  0.0  0.0      0     0 ?        S    09:22   0:00 [migration/0]

root         8  0.0  0.0      0     0 ?        S    09:22   0:00 [rcu_bh]

root         9  0.0  0.0      0     0 ?        S    09:22   0:02 [rcu_sched]

root        10  0.0  0.0      0     0 ?        S    09:22   0:00 [watchdog/0]

root        11  0.0  0.0      0     0 ?        S    09:22   0:00 [watchdog/1]

root        12  0.0  0.0      0     0 ?        S    09:22   0:00 [migration/1]

root        13  0.0  0.0      0     0 ?        S    09:22   0:01 [ksoftirqd/1]

root        15  0.0  0.0      0     0 ?        S<   09:22   0:00 [kworker/1:0H]

root        16  0.0  0.0      0     0 ?        S<   09:22   0:00 [khelper]

root        17  0.0  0.0      0     0 ?        S    09:22   0:00 [kdevtmpfs]

root        18  0.0  0.0      0     0 ?        S<   09:22   0:00 [netns]

root        19  0.0  0.0      0     0 ?        S<   09:22   0:00 [writeback]

root        20  0.0  0.0      0     0 ?        S<   09:22   0:00 [kintegrityd]

root        21  0.0  0.0      0     0 ?        S<   09:22   0:00 [bioset]

root        22  0.0  0.0      0     0 ?        S<   09:22   0:00 [kblockd]

root        25  0.0  0.0      0     0 ?        S    09:22   0:00 [khungtaskd]

root        26  0.0  0.0      0     0 ?        S    09:22   0:00 [kswapd0]

root        27  0.0  0.0      0     0 ?        SN   09:22   0:00 [ksmd]

root        28  0.0  0.0      0     0 ?        SN   09:22   0:00 [khugepaged]

root        29  0.0  0.0      0     0 ?        S    09:22   0:00 [fsnotify_mark]

root        30  0.0  0.0      0     0 ?        S<   09:22   0:00 [crypto]

root        35  0.0  0.0      0     0 ?        S<   09:22   0:00 [kthrotld]

root        36  0.0  0.0      0     0 ?        S<   09:22   0:00 [deferwq]

root        94  0.0  0.0      0     0 ?        S    09:22   0:00 [khubd]

root       139  0.0  0.0      0     0 ?        S<   09:22   0:00 [ata_sff]

root       176  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_0]

root       177  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_1]

root       178  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_2]

root       179  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_3]

root       180  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_4]

root       181  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_5]

root       200  0.0  0.0      0     0 ?        S    09:22   0:00 [scsi_eh_6]

root       201  0.0  0.0      0     0 ?        D    09:22   0:01 [usb-storage]

root       215  0.0  0.0      0     0 ?        S<   09:22   0:00 [kworker/1:1H]

root       216  0.0  0.0      0     0 ?        S<   09:22   0:00 [kworker/0:1H]

root       438  0.0  0.0      0     0 ?        S<   09:22   0:00 [loop0]

root       946  0.0  0.0      0     0 ?        S    09:22   0:00 [jbd2/sdb2-8]

root       947  0.0  0.0      0     0 ?        S<   09:22   0:00 [ext4-rsv-conve

root      1351  0.0  0.0   2888  1520 ?        Ss   09:22   0:00 udevd --daemon

root      1480  0.0  0.0   2896  1188 ?        S    09:22   0:00 udevd --daemon

root      1488  0.0  0.0   2924  1188 ?        S    09:22   0:00 udevd --daemon

root      1529  0.0  0.0      0     0 ?        S<   09:22   0:00 [kpsmoused]

root      1542  0.0  0.0      0     0 ?        S<   09:22   0:00 [hd-audio0]

root      1568  0.0  0.0      0     0 ?        S<   09:22   0:00 [cfg80211]

root      3146  0.0  0.0  28076  1644 ?        Sl   09:22   0:00 /usr/sbin/rsysl

102       3198  0.0  0.0   4044  2168 ?        Ss   09:22   0:01 /usr/bin/dbus-d

daemon    3245  0.0  0.0   2156   124 ?        Ss   09:22   0:00 /usr/sbin/atd

root      3287  0.0  0.0  10500   844 ?        Sl   09:22   0:00 /usr/sbin/pcscd

root      3297  0.0  0.0   3776   980 ?        Ss   09:22   0:00 /usr/sbin/cron

root      3303  0.0  0.1  27544  5140 ?        Ssl  09:22   0:01 /usr/sbin/Netwo

root      3375  0.0  0.0  24308  3980 ?        Sl   09:22   0:00 /usr/lib/policy

root      3376  0.0  0.0  18068  2896 ?        Sl   09:22   0:00 /usr/sbin/gdm3

root      3422  0.0  0.0   6892  2784 ?        S    09:22   0:00 /usr/sbin/modem

root      3426  0.0  0.0   5832  2668 ?        S    09:22   0:00 /sbin/wpa_suppl

root      3427  0.0  0.0  20520  3988 ?        Sl   09:22   0:00 /usr/lib/gdm3/g

root      3430  5.8  0.5 109224 23520 tty7     Ss+  09:22   5:30 /usr/bin/Xorg :

root      3433  0.0  0.0   5184  3092 ?        S    09:22   0:00 /sbin/dhclient 

root      3441  0.0  0.0   3384  1780 tty1     Ss   09:22   0:00 /bin/login -f  

root      3442  0.0  0.0   3384  1780 tty2     Ss   09:22   0:00 /bin/login -f  

root      3443  0.0  0.0   3384  1784 tty3     Ss   09:22   0:00 /bin/login -f  

root      3444  0.0  0.0   3384  1784 tty4     Ss   09:22   0:00 /bin/login -f  

root      3445  0.0  0.0   3384  1784 tty5     Ss   09:22   0:00 /bin/login -f  

root      3446  0.0  0.0   3384  1784 tty6     Ss   09:22   0:00 /bin/login -f  

root      3448  0.0  0.0  28220  3544 ?        Sl   09:23   0:00 /usr/sbin/conso

root      3557  0.0  0.1   7040  4212 tty1     S+   09:23   0:00 -bash

root      3558  0.0  0.1   7040  4216 tty2     S+   09:23   0:00 -bash

root      3559  0.0  0.1   7040  4208 tty6     S+   09:23   0:00 -bash

root      3560  0.0  0.1   7040  4216 tty5     S+   09:23   0:00 -bash

root      3561  0.0  0.1   7040  4208 tty3     S+   09:23   0:00 -bash

root      3562  0.0  0.1   7040  4216 tty4     S+   09:23   0:00 -bash

root      3710  0.0  0.1  27680  4028 ?        Sl   09:23   0:00 gdm-session-wor

root      3713  0.0  0.0  23400  3024 ?        Sl   09:23   0:00 /usr/lib/accoun

root      3716  0.0  0.0      0     0 ?        S    09:23   0:00 [kauditd]

kiss      3725  0.0  0.2  50552  9656 ?        Ssl  09:23   0:00 x-session-manag

kiss      3767  0.0  0.0   3520   540 ?        S    09:23   0:00 dbus-launch --a

kiss      3768  0.0  0.0   3016   928 ?        Ss   09:23   0:00 /usr/bin/dbus-d

kiss      3771  0.0  0.0  31232  2424 ?        Sl   09:23   0:00 /usr/lib/dconf/

kiss      3784  0.0  0.0   3872   212 ?        Ss   09:23   0:00 /usr/bin/ssh-ag

kiss      3787  0.0  0.0   3520   536 ?        S    09:23   0:00 /usr/bin/dbus-l

kiss      3788  0.0  0.0   4984  2164 ?        Ss   09:23   0:00 /usr/bin/dbus-d

kiss      3793  0.0  0.5 227180 20532 ?        Sl   09:23   0:04 /usr/lib/gnome-

kiss      3802  0.0  0.0  60612  3540 ?        Sl   09:23   0:00 /usr/bin/gnome-

root      3808  0.0  0.1  35700  4012 ?        Sl   09:23   0:00 /usr/lib/upower

kiss      3866  0.0  0.0   8908  2592 ?        S    09:23   0:00 /usr/lib/gvfs/g

kiss      3986  3.7  0.3 103552 15116 ?        S<l  09:23   3:26 /usr/bin/pulsea

rtkit     3988  0.0  0.0  18992  1228 ?        SNl  09:23   0:00 /usr/lib/rtkit/

kiss      3995  0.0  0.0   9880  3672 ?        S    09:23   0:00 /usr/lib/gvfs/g

root      3997  0.0  0.0  24100  3652 ?        Sl   09:23   0:00 /usr/lib/udisks

root      3998  0.0  0.0   6356   728 ?        S    09:23   0:00 udisks-daemon: 

kiss      4001  0.0  0.0   8604  2200 ?        S    09:23   0:00 /usr/lib/gvfs/g

kiss      4003  0.0  0.0  19072  2348 ?        Sl   09:23   0:00 /usr/lib/gvfs/g

colord    4007  0.0  0.1  25604  4288 ?        Sl   09:23   0:00 /usr/lib/i386-l

kiss      4009  0.1  0.3 132600 14388 ?        Sl   09:23   0:07 /usr/bin/metaci

colord    4018  0.0  0.1  43144  7720 ?        Sl   09:23   0:01 /usr/lib/i386-l

kiss      4023  0.0  0.1  46484  4036 ?        Sl   09:23   0:00 /usr/lib/gnome-

kiss      4031  0.3  0.7 107348 31480 ?        Sl   09:23   0:20 gnome-panel

kiss      4037  0.0  0.0   8844  3008 ?        S    09:23   0:00 /usr/lib/i386-l

kiss      4039  0.0  0.0  31364  2468 ?        Sl   09:23   0:00 /usr/lib/dconf/

kiss      4043  0.0  0.4  72896 16568 ?        Sl   09:23   0:01 nm-applet

kiss      4046  0.0  0.2  32052  8620 ?        Sl   09:23   0:00 /usr/lib/policy

kiss      4047  0.2  0.7  87824 31192 ?        Sl   09:23   0:14 /usr/lib/tracke

kiss      4052  0.0  0.2  68220  9716 ?        SNl  09:23   0:01 /usr/lib/tracke

kiss      4053  0.0  0.3  55912 12120 ?        Sl   09:23   0:00 bluetooth-apple

kiss      4054  0.0  0.2  56748  8572 ?        Sl   09:23   0:00 /usr/lib/gnome-

kiss      4055  0.0  0.2  40696  8920 ?        Sl   09:23   0:00 gnome-screensav

kiss      4058  0.2  0.5 109568 22652 ?        Sl   09:23   0:12 nautilus -n

kiss      4062  0.0  0.2  25508  8908 ?        S    09:23   0:00 /usr/lib/gnome-

kiss      4065  0.0  0.3 208108 15744 ?        Sl   09:23   0:01 gnome-sound-app

kiss      4067  0.0  0.2  40124  8832 ?        Sl   09:23   0:00 /usr/lib/notifi

kiss      4094  0.0  0.0   9300  3256 ?        S    09:23   0:00 /usr/lib/gvfs/g

kiss      4096  0.0  0.1  37620  5116 ?        Sl   09:23   0:00 /usr/lib/telepa

kiss      4100  0.0  0.2  91904  9612 ?        Sl   09:23   0:00 /usr/lib/gnome-

kiss      4104  0.0  0.0   8736  2596 ?        S    09:23   0:00 /usr/lib/gvfs/g

kiss      4107  0.0  0.0   8476  2872 ?        S    09:24   0:00 /usr/lib/gvfs/g

kiss      4195  7.5  1.6 359576 65356 ?        Sl   09:25   6:51 /usr/bin/python

kiss      4224  4.5  0.5  66416 22508 ?        Sl   09:25   4:06 gnome-system-mo

kiss      4230 11.0  4.9 639172 198116 ?       Rl   09:28   9:43 iceweasel

kiss      4242  0.0  0.0  33992  3128 ?        Sl   09:28   0:00 /usr/lib/at-spi

kiss      4332  7.9  2.7 359092 109412 ?       Sl   09:34   6:26 /usr/lib/icewea

root      4754  0.0  0.0      0     0 ?        S    10:07   0:01 [kworker/1:0]

root      4755  0.0  0.0      0     0 ?        S    10:07   0:00 [kworker/u8:0]

root      4772  0.0  0.0      0     0 ?        S    10:16   0:01 [kworker/0:1]

kiss      4815  0.5  0.4  78660 18576 ?        Sl   10:24   0:09 gnome-terminal

kiss      4821  0.0  0.0   2084   708 ?        S    10:24   0:00 gnome-pty-helpe

kiss      4822  0.0  0.0   6144  3292 pts/0    Ss   10:24   0:00 bash

root      4833  0.0  0.0   4760  1612 pts/0    S    10:24   0:00 su

root      4841  0.0  0.0   6084  3384 pts/0    S+   10:24   0:00 bash

kiss      4858  0.0  0.0   6144  3296 pts/1    Ss   10:28   0:00 bash

kiss      4866  0.2  0.0   4580  1564 pts/1    S+   10:28   0:04 top

root      4880  0.0  0.0      0     0 ?        S    10:35   0:00 [kworker/u8:1]

root      4895  0.0  0.0      0     0 ?        S    10:42   0:00 [kworker/0:2]

kiss      4901  0.0  0.0   6144  3292 pts/2    Ss   10:43   0:00 bash

kiss      4910  0.2  0.8  76708 32348 pts/2    Sl+  10:45   0:01 /usr/bin/python

root      4911  0.0  0.0      0     0 ?        S    10:45   0:00 [kworker/1:2]

kiss      4925  0.0  0.0  29488  3732 ?        Sl   10:45   0:00 /usr/lib/gvfs/g

kiss      4958  0.0  0.5  98388 22316 pts/2    Sl+  10:45   0:00 /usr/bin/python

root      5002  0.0  0.0      0     0 ?        S    10:52   0:00 [kworker/0:0]

root      5003  0.0  0.0      0     0 ?        S    10:53   0:00 [kworker/u8:2]

root      5006  0.0  0.0      0     0 ?        S    10:55   0:00 [kworker/0:3]

root      5007  0.0  0.0      0     0 ?        S    10:55   0:00 [kworker/1:1]

kiss      5008  0.0  0.0   1936   512 pts/3    Ss+  10:56   0:00 /bin/sh -c ps a

kiss      5009  0.0  0.0   4284  1196 pts/3    R+   10:56   0:00 ps aux


In [3]:
!ps axjf
 PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND

    0     2     0     0 ?           -1 S        0   0:00 [kthreadd]

    2     3     0     0 ?           -1 S        0   0:01  \_ [ksoftirqd/0]

    2     5     0     0 ?           -1 S<       0   0:00  \_ [kworker/0:0H]

    2     7     0     0 ?           -1 S        0   0:00  \_ [migration/0]

    2     8     0     0 ?           -1 S        0   0:00  \_ [rcu_bh]

    2     9     0     0 ?           -1 S        0   0:02  \_ [rcu_sched]

    2    10     0     0 ?           -1 S        0   0:00  \_ [watchdog/0]

    2    11     0     0 ?           -1 S        0   0:00  \_ [watchdog/1]

    2    12     0     0 ?           -1 S        0   0:00  \_ [migration/1]

    2    13     0     0 ?           -1 S        0   0:01  \_ [ksoftirqd/1]

    2    15     0     0 ?           -1 S<       0   0:00  \_ [kworker/1:0H]

    2    16     0     0 ?           -1 S<       0   0:00  \_ [khelper]

    2    17     0     0 ?           -1 S        0   0:00  \_ [kdevtmpfs]

    2    18     0     0 ?           -1 S<       0   0:00  \_ [netns]

    2    19     0     0 ?           -1 S<       0   0:00  \_ [writeback]

    2    20     0     0 ?           -1 S<       0   0:00  \_ [kintegrityd]

    2    21     0     0 ?           -1 S<       0   0:00  \_ [bioset]

    2    22     0     0 ?           -1 S<       0   0:00  \_ [kblockd]

    2    25     0     0 ?           -1 S        0   0:00  \_ [khungtaskd]

    2    26     0     0 ?           -1 S        0   0:00  \_ [kswapd0]

    2    27     0     0 ?           -1 SN       0   0:00  \_ [ksmd]

    2    28     0     0 ?           -1 SN       0   0:00  \_ [khugepaged]

    2    29     0     0 ?           -1 S        0   0:00  \_ [fsnotify_mark]

    2    30     0     0 ?           -1 S<       0   0:00  \_ [crypto]

    2    35     0     0 ?           -1 S<       0   0:00  \_ [kthrotld]

    2    36     0     0 ?           -1 S<       0   0:00  \_ [deferwq]

    2    94     0     0 ?           -1 S        0   0:00  \_ [khubd]

    2   139     0     0 ?           -1 S<       0   0:00  \_ [ata_sff]

    2   176     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_0]

    2   177     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_1]

    2   178     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_2]

    2   179     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_3]

    2   180     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_4]

    2   181     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_5]

    2   200     0     0 ?           -1 S        0   0:00  \_ [scsi_eh_6]

    2   201     0     0 ?           -1 D        0   0:01  \_ [usb-storage]

    2   215     0     0 ?           -1 S<       0   0:00  \_ [kworker/1:1H]

    2   216     0     0 ?           -1 S<       0   0:00  \_ [kworker/0:1H]

    2   438     0     0 ?           -1 S<       0   0:00  \_ [loop0]

    2   946     0     0 ?           -1 S        0   0:00  \_ [jbd2/sdb2-8]

    2   947     0     0 ?           -1 S<       0   0:00  \_ [ext4-rsv-conver]

    2  1529     0     0 ?           -1 S<       0   0:00  \_ [kpsmoused]

    2  1542     0     0 ?           -1 S<       0   0:00  \_ [hd-audio0]

    2  1568     0     0 ?           -1 S<       0   0:00  \_ [cfg80211]

    2  3716     0     0 ?           -1 S        0   0:00  \_ [kauditd]

    2  4754     0     0 ?           -1 S        0   0:02  \_ [kworker/1:0]

    2  4772     0     0 ?           -1 S        0   0:02  \_ [kworker/0:1]

    2  5003     0     0 ?           -1 S        0   0:00  \_ [kworker/u8:2]

    2  5007     0     0 ?           -1 S        0   0:00  \_ [kworker/1:1]

    2  5016     0     0 ?           -1 S        0   0:00  \_ [kworker/u8:1]

    2  5017     0     0 ?           -1 S        0   0:00  \_ [kworker/0:2]

    2  5019     0     0 ?           -1 S        0   0:00  \_ [kworker/1:2]

    2  5021     0     0 ?           -1 S        0   0:00  \_ [kworker/1:3]

    2  5022     0     0 ?           -1 S        0   0:00  \_ [kworker/0:0]

    2  5023     0     0 ?           -1 S        0   0:00  \_ [kworker/u8:0]

    2  5026     0     0 ?           -1 S        0   0:00  \_ [kworker/0:3]

    0     1     1     1 ?           -1 Ss       0   0:01 init [2]              

    1  1351  1351  1351 ?           -1 Ss       0   0:00 udevd --daemon

 1351  1480  1351  1351 ?           -1 S        0   0:00  \_ udevd --daemon

 1351  1488  1351  1351 ?           -1 S        0   0:00  \_ udevd --daemon

    1  3146  3081  3071 ?           -1 Sl       0   0:00 /usr/sbin/rsyslogd -c5

    1  3198  3198  3198 ?           -1 Ss     102   0:01 /usr/bin/dbus-daemon --

    1  3245  3245  3245 ?           -1 Ss       1   0:00 /usr/sbin/atd

    1  3287  3242  3071 ?           -1 Sl       0   0:00 /usr/sbin/pcscd

    1  3297  3297  3297 ?           -1 Ss       0   0:00 /usr/sbin/cron

    1  3303  3303  3303 ?           -1 Ssl      0   0:01 /usr/sbin/NetworkManage

 3303  3433  3433  3303 ?           -1 S        0   0:00  \_ /sbin/dhclient -d -

    1  3375  3198  3198 ?           -1 Sl       0   0:00 /usr/lib/policykit-1/po

    1  3376  3373  3373 ?           -1 Sl       0   0:00 /usr/sbin/gdm3

 3376  3427  3373  3373 ?           -1 Sl       0   0:00  \_ /usr/lib/gdm3/gdm-s

 3427  3430  3430  3430 tty7      3430 Ss+      0   6:05      \_ /usr/bin/Xorg :

 3427  3710  3373  3373 ?           -1 Sl       0   0:00      \_ gdm-session-wor

 3710  3725  3725  3725 ?           -1 Ssl   1000   0:00          \_ x-session-m

 3725  3784  3784  3784 ?           -1 Ss    1000   0:00              \_ /usr/bi

 3725  3793  3725  3725 ?           -1 Sl    1000   0:04              \_ /usr/li

 3725  4009  3725  3725 ?           -1 Sl    1000   0:07              \_ /usr/bi

 3725  4031  3725  3725 ?           -1 Sl    1000   0:21              \_ gnome-p

 4031  4195  3725  3725 ?           -1 Sl    1000   6:51              |   \_ /us

 4031  4224  3725  3725 ?           -1 Sl    1000   4:36              |   \_ gno

 4031  4230  3725  3725 ?           -1 Rl    1000  10:17              |   \_ ice

 4230  4332  3725  3725 ?           -1 Sl    1000   6:57              |   |   \_

 4031  4815  3725  3725 ?           -1 Sl    1000   0:16              |   \_ gno

 4815  4821  3725  3725 ?           -1 S     1000   0:00              |       \_

 4815  4822  4822  4822 pts/0     4841 Ss    1000   0:00              |       \_

 4822  4833  4833  4822 pts/0     4841 S        0   0:00              |       | 

 4833  4841  4841  4822 pts/0     4841 S+       0   0:00              |       | 

 4815  4858  4858  4858 pts/1     4866 Ss    1000   0:00              |       \_

 4858  4866  4866  4858 pts/1     4866 S+    1000   0:06              |       | 

 4815  4901  4901  4901 pts/2     4910 Ss    1000   0:00              |       \_

 4901  4910  4910  4901 pts/2     4910 Sl+   1000   0:02              |         

 4910  4958  4910  4901 pts/2     4910 Sl+   1000   0:00              |         

 4958  5027  5027  5027 pts/3     5027 Ss+   1000   0:00              |         

 5027  5028  5027  5027 pts/3     5027 R+    1000   0:00              |         

 3725  4043  3725  3725 ?           -1 Sl    1000   0:01              \_ nm-appl

 3725  4046  3725  3725 ?           -1 Sl    1000   0:00              \_ /usr/li

 3725  4047  3725  3725 ?           -1 Sl    1000   0:14              \_ /usr/li

 3725  4052  3725  3725 ?           -1 SNl   1000   0:01              \_ /usr/li

 3725  4053  3725  3725 ?           -1 Sl    1000   0:00              \_ bluetoo

 3725  4054  3725  3725 ?           -1 Sl    1000   0:00              \_ /usr/li

 3725  4055  3725  3725 ?           -1 Sl    1000   0:00              \_ gnome-s

 3725  4058  3725  3725 ?           -1 Sl    1000   0:13              \_ nautilu

 3725  4062  3725  3725 ?           -1 S     1000   0:00              \_ /usr/li

 3725  4065  3725  3725 ?           -1 Sl    1000   0:01              \_ gnome-s

 3725  4067  3725  3725 ?           -1 Sl    1000   0:00              \_ /usr/li

    1  3422  3198  3198 ?           -1 S        0   0:00 /usr/sbin/modem-manager

    1  3426  3198  3198 ?           -1 S        0   0:00 /sbin/wpa_supplicant -u

    1  3441  3441  3441 tty1      3557 Ss       0   0:00 /bin/login -f     

 3441  3557  3557  3441 tty1      3557 S+       0   0:00  \_ -bash

    1  3442  3442  3442 tty2      3558 Ss       0   0:00 /bin/login -f     

 3442  3558  3558  3442 tty2      3558 S+       0   0:00  \_ -bash

    1  3443  3443  3443 tty3      3561 Ss       0   0:00 /bin/login -f     

 3443  3561  3561  3443 tty3      3561 S+       0   0:00  \_ -bash

    1  3444  3444  3444 tty4      3562 Ss       0   0:00 /bin/login -f     

 3444  3562  3562  3444 tty4      3562 S+       0   0:00  \_ -bash

    1  3445  3445  3445 tty5      3560 Ss       0   0:00 /bin/login -f     

 3445  3560  3560  3445 tty5      3560 S+       0   0:00  \_ -bash

    1  3446  3446  3446 tty6      3559 Ss       0   0:00 /bin/login -f     

 3446  3559  3559  3446 tty6      3559 S+       0   0:00  \_ -bash

    1  3448  3198  3198 ?           -1 Sl       0   0:00 /usr/sbin/console-kit-d

    1  3713  3198  3198 ?           -1 Sl       0   0:00 /usr/lib/accountsservic

    1  3767  3725  3725 ?           -1 S     1000   0:00 dbus-launch --autolaunc

    1  3768  3768  3768 ?           -1 Ss    1000   0:00 /usr/bin/dbus-daemon --

    1  3771  3768  3768 ?           -1 Sl    1000   0:00 /usr/lib/dconf/dconf-se

    1  3787  3725  3725 ?           -1 S     1000   0:00 /usr/bin/dbus-launch --

    1  3788  3788  3788 ?           -1 Ss    1000   0:00 /usr/bin/dbus-daemon --

    1  3802  3725  3725 ?           -1 Sl    1000   0:00 /usr/bin/gnome-keyring-

    1  3808  3198  3198 ?           -1 Sl       0   0:00 /usr/lib/upower/upowerd

    1  3866  3788  3788 ?           -1 S     1000   0:00 /usr/lib/gvfs/gvfsd

    1  3986  3985  3985 ?           -1 S<l   1000   3:40 /usr/bin/pulseaudio --s

    1  3988  3198  3198 ?           -1 SNl    124   0:00 /usr/lib/rtkit/rtkit-da

    1  3995  3788  3788 ?           -1 S     1000   0:00 /usr/lib/gvfs/gvfs-gdu-

    1  3997  3198  3198 ?           -1 Sl       0   0:00 /usr/lib/udisks/udisks-

 3997  3998  3198  3198 ?           -1 S        0   0:01  \_ udisks-daemon: poll

    1  4001  3788  3788 ?           -1 S     1000   0:00 /usr/lib/gvfs/gvfs-gpho

    1  4003  3788  3788 ?           -1 Sl    1000   0:00 /usr/lib/gvfs/gvfs-afc-

    1  4007  3198  3198 ?           -1 Sl     103   0:00 /usr/lib/i386-linux-gnu

    1  4018  3198  3198 ?           -1 Sl     103   0:01 /usr/lib/i386-linux-gnu

    1  4023  3725  3725 ?           -1 Sl    1000   0:00 /usr/lib/gnome-settings

    1  4037  3788  3788 ?           -1 S     1000   0:00 /usr/lib/i386-linux-gnu

    1  4039  3788  3788 ?           -1 Sl    1000   0:00 /usr/lib/dconf/dconf-se

    1  4094  3788  3788 ?           -1 S     1000   0:00 /usr/lib/gvfs/gvfsd-tra

    1  4096  3788  3788 ?           -1 Sl    1000   0:00 /usr/lib/telepathy/miss

    1  4100  3788  3788 ?           -1 Sl    1000   0:00 /usr/lib/gnome-online-a

    1  4104  3788  3788 ?           -1 S     1000   0:00 /usr/lib/gvfs/gvfsd-bur

    1  4107  3788  3788 ?           -1 S     1000   0:00 /usr/lib/gvfs/gvfsd-met

    1  4242  3788  3788 ?           -1 Sl    1000   0:00 /usr/lib/at-spi2-core/a

    1  4925  3788  3788 ?           -1 Sl    1000   0:00 /usr/lib/gvfs/gvfsd-htt


lsof
In [*]:
!lsof bash

lsof: status error on bash: No such file or directory
lsof 4.86
 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
 latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
 usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s]
 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.
In [*]:
# не знаю, как запустить под root здесь, потомв просто копирую результат из консоли
!locate 00QUI
/usr/share/doc/lsof/00QUICKSTART.gz
In [*]:
!free

             total       used       free     shared    buffers     cached
Mem:       4010428    1645476    2364952          0     144528     820024
-/+ buffers/cache:     680924    3329504
Swap:            0          0          0
In []:
free --help

Usage:
 free [options]

Options:
 -b, --bytes         show output in bytes
 -k, --kilo          show output in kilobytes
 -m, --mega          show output in megabytes
 -g, --giga          show output in gigabytes
     --tera          show output in terabytes
 -h, --human         show human readable output
     --si            use powers of 1000 not 1024
 -l, --lohi          show detailed low and high memory statistics
 -o, --old           use old format (no -/+buffers/cache line)
 -t, --total         show total for RAM + swap
 -s N, --seconds N   repeat printing every N seconds
 -c N, --count N     repeat printing N times

      --help    display this help text
 -V, --version  output version information and exit

For more details see free(1).
In [*]:
!du --help
Usage: du [OPTION]... [FILE]...
  or:  du [OPTION]... --files0-from=F
Summarize disk usage of each FILE, recursively for directories.

Mandatory arguments to long options are mandatory for short options too.
  -a, --all             write counts for all files, not just directories
      --apparent-size   print apparent sizes, rather than disk usage; although
                          the apparent size is usually smaller, it may be
                          larger due to holes in (`sparse') files, internal
                          fragmentation, indirect blocks, and the like
  -B, --block-size=SIZE  scale sizes by SIZE before printing them.  E.g.,
                           `-BM' prints sizes in units of 1,048,576 bytes.
                           See SIZE format below.
  -b, --bytes           equivalent to `--apparent-size --block-size=1'
  -c, --total           produce a grand total
  -D, --dereference-args  dereference only symlinks that are listed on the
                          command line
      --files0-from=F   summarize disk usage of the NUL-terminated file
                          names specified in file F;
                          If F is - then read names from standard input
  -H                    equivalent to --dereference-args (-D)
  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)
      --si              like -h, but use powers of 1000 not 1024
  -k                    like --block-size=1K
  -l, --count-links     count sizes many times if hard linked
  -m                    like --block-size=1M
  -L, --dereference     dereference all symbolic links
  -P, --no-dereference  don't follow any symbolic links (this is the default)
  -0, --null            end each output line with 0 byte rather than newline
  -S, --separate-dirs   do not include size of subdirectories
  -s, --summarize       display only a total for each argument
  -x, --one-file-system    skip directories on different file systems
  -X, --exclude-from=FILE  exclude files that match any pattern in FILE
      --exclude=PATTERN    exclude files that match PATTERN
  -d, --max-depth=N     print the total for a directory (or file, with --all)
                          only if it is N or fewer levels below the command
                          line argument;  --max-depth=0 is the same as
                          --summarize
      --time            show time of the last modification of any file in the
                          directory, or any of its subdirectories
      --time=WORD       show time as WORD instead of modification time:
                          atime, access, use, ctime or status
      --time-style=STYLE  show times using style STYLE:
                          full-iso, long-iso, iso, +FORMAT
                          FORMAT is interpreted like `date'
      --help     display this help and exit
      --version  output version information and exit

Display values are in units of the first available SIZE from --block-size,
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

SIZE may be (or may be an integer optionally followed by) one of following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

Report du bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'du invocation'


Посты чуть ниже также могут вас заинтересовать

Комментариев нет:

Отправить комментарий