/l3/users/20-10-2014/NT-Ladm/debian4.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 |
|
#cat /etc/passwd | awk -F: '$3>999 && $3!=65534' | wc -c
124 |
#cat /etc/passwd | awk -F: '$3>999 && $3!=65534' | wc -l
2 |
#ps lax
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 836 - Ss ? 0:09 init [2] 1 0 2 0 20 0 0 0 - S ? 0:00 [kthreadd] 1 0 3 2 20 0 0 0 - S ? 0:03 [ksoftirqd/ 1 0 5 2 20 0 0 0 - S ? 0:00 [kworker/u: 1 0 6 2 -100 - 0 0 - S ? 0:00 [migration/ 5 0 7 2 -100 - 0 0 - S ? 0:05 [watchdog/0 1 0 8 2 0 -20 0 0 - S< ? 0:00 [cpuset] 1 0 9 2 0 -20 0 0 - S< ? 0:00 [khelper] 5 0 10 2 20 0 0 0 - S ? 0:00 [kdevtmpfs] ... 1 0 18522 1 20 0 18168 464 - S ? 0:00 script -f - 0 0 18523 18522 20 0 23992 2524 - Ss pts/3 0:00 l3script 0 0 19230 18523 20 0 18720 1628 - S+ pts/3 0:00 man test 0 0 19239 19230 20 0 10048 912 - S+ pts/3 0:00 pager -s 4 0 22885 2296 20 0 71292 3696 - Ss ? 0:00 sshd: root@ 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f - 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f - 0 0 22964 22963 20 0 21712 2320 - Ss pts/5 0:00 l3script 4 0 22993 22964 20 0 10536 836 - R+ pts/5 0:00 ps lax |
#ps la
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 2320 1 20 0 18368 972 - Ss+ tty1 0:00 /sbin/getty 4 0 2321 1 20 0 18368 972 - Ss+ tty2 0:00 /sbin/getty 4 0 2322 1 20 0 18368 968 - Ss+ tty3 0:00 /sbin/getty 4 0 2323 1 20 0 18368 976 - Ss+ tty4 0:00 /sbin/getty 4 0 2324 1 20 0 18368 972 - Ss+ tty5 0:00 /sbin/getty 4 0 2325 1 20 0 18368 964 - Ss+ tty6 0:00 /sbin/getty 4 0 9541 9540 20 0 24104 2616 - Ss pts/1 0:00 l3script 1 0 10519 9541 20 0 24104 1312 - S+ pts/1 0:00 l3script 0 0 10527 10519 20 0 33732 2980 - S+ pts/1 0:00 /usr/bin/vi 0 0 18523 18522 20 0 23992 2524 - Ss pts/3 0:00 l3script 0 0 19230 18523 20 0 18720 1628 - S+ pts/3 0:00 man test 0 0 19239 19230 20 0 10048 912 - S+ pts/3 0:00 pager -s 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f - 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f - 0 0 22964 22963 20 0 21712 2320 - Ss pts/5 0:00 l3script 0 1001 23004 23003 20 0 22596 3192 - Ss+ pts/6 0:00 -bash 4 0 23085 22964 20 0 10536 836 - R+ pts/5 0:00 ps la |
#ps lax
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 836 - Ss ? 0:09 init [2] 1 0 2 0 20 0 0 0 - S ? 0:00 [kthreadd] 1 0 3 2 20 0 0 0 - S ? 0:03 [ksoftirqd/ 1 0 5 2 20 0 0 0 - S ? 0:00 [kworker/u: 1 0 6 2 -100 - 0 0 - S ? 0:00 [migration/ 5 0 7 2 -100 - 0 0 - S ? 0:05 [watchdog/0 1 0 8 2 0 -20 0 0 - S< ? 0:00 [cpuset] 1 0 9 2 0 -20 0 0 - S< ? 0:00 [khelper] 5 0 10 2 20 0 0 0 - S ? 0:00 [kdevtmpfs] ... 0 0 19239 19230 20 0 10048 912 - S+ pts/3 0:00 pager -s 4 0 22885 2296 20 0 71292 3696 - Ss ? 0:00 sshd: root@ 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f - 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f - 0 0 22964 22963 20 0 21712 2320 - Ss pts/5 0:00 l3script 4 0 23001 2296 20 0 71292 3616 - Ss ? 0:00 sshd: stude 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: stude 0 1001 23004 23003 20 0 22596 3192 - Ss+ pts/6 0:00 -bash 4 0 23093 22964 20 0 10536 840 - R+ pts/5 0:00 ps lax |
#ps lax
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 836 - Ss ? 0:09 init [2] 1 0 2 0 20 0 0 0 - S ? 0:00 [kthreadd] 1 0 3 2 20 0 0 0 - S ? 0:03 [ksoftirqd/ 1 0 5 2 20 0 0 0 - S ? 0:00 [kworker/u: 1 0 6 2 -100 - 0 0 - S ? 0:00 [migration/ 5 0 7 2 -100 - 0 0 - S ? 0:05 [watchdog/0 1 0 8 2 0 -20 0 0 - S< ? 0:00 [cpuset] 1 0 9 2 0 -20 0 0 - S< ? 0:00 [khelper] 5 0 10 2 20 0 0 0 - S ? 0:00 [kdevtmpfs] ... 4 0 22885 2296 20 0 71292 3696 - Ss ? 0:00 sshd: root@ 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f - 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f - 0 0 22964 22963 20 0 21712 2320 - Ss pts/5 0:00 l3script 4 0 23001 2296 20 0 71292 3616 - Ss ? 0:00 sshd: stude 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: stude 0 1001 23004 23003 20 0 22596 3192 - Ss pts/6 0:00 -bash 0 0 23101 23004 20 0 33128 1260 - S+ pts/6 0:00 passwd 4 0 23102 22964 20 0 10536 836 - R+ pts/5 0:00 ps lax |
#ps u -u student
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND student 23003 0.0 0.3 71292 1764 ? S 09:41 0:00 sshd: student@pts/6 student 23004 0.0 0.6 22596 3192 pts/6 Ss 09:41 0:00 -bash |
#ps
PID TTY TIME CMD 22964 pts/5 00:00:00 l3script 23120 pts/5 00:00:00 ps |
#ps -l
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 S 0 22964 22963 0 80 0 - 5428 - pts/5 00:00:00 l3script 4 R 0 23128 22964 0 80 0 - 2634 - pts/5 00:00:00 ps |
#ps u -U student
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND student 23003 0.0 0.3 71292 1764 ? S 09:41 0:00 sshd: student@pts/6 student 23004 0.0 0.6 22596 3192 pts/6 Ss 09:41 0:00 -bash root 23101 0.0 0.2 33128 1260 pts/6 S+ 09:42 0:00 passwd |
#ps --help
Usage: ps [options] Try 'ps --help <simple|list|output|threads|misc|all>' or 'ps --help <s|l|o|t|m|a>' for additional help text. For more details see ps(1). |
#help ps
![]() l3script: help: no help topics match `ps'. Try `help help' or `man -k ps' or `info ps'. |
#man ps
|
#netstat -tanp
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2296/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2263/exim4 tcp 0 464 192.168.13.4:22 192.168.15.102:53169 ESTABLISHED 22885/4 tcp 0 0 192.168.13.4:22 192.168.15.102:59901 ESTABLISHED 23001/sshd: student tcp6 0 0 :::22 :::* LISTEN 2296/sshd tcp6 0 0 ::1:25 :::* LISTEN 2263/exim4 |
#ps alx |grep -sshd
![]() grep: паÑамеÑÑÑ ÑÑебÑеÑÑÑ Ð°ÑгÑÐ¼ÐµÐ½Ñ Â«d» ÐÑполÑзование: grep [ÐÐÐ ÐÐÐТР]⦠ШÐÐÐФÐÐÐ rep --help» Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð±Ð¾Ð»ÐµÐµ подÑобного опиÑаниÑ. |
#ps alx |grep sshd
5 0 2296 1 20 0 49932 1252 - Ss ? 0:00 /usr/sbin/sshd 4 0 22885 2296 20 0 71292 3696 - Ss ? 0:00 sshd: root@pts/4 4 0 23001 2296 20 0 71292 3616 - Ss ? 0:00 sshd: student [priv] 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 0 23200 22964 20 0 9972 868 - S+ pts/5 0:00 grep sshd |
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22596 3192 - Ss pts/6 0:00 -bash 0 0 23101 23004 20 0 33128 1260 - S+ pts/6 0:00 passwd |
#ps l -p 23001
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 23001 2296 20 0 71292 3616 - Ss ? 0:00 sshd: student [priv] |
#ps l -p 2296
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 0 2296 1 20 0 49932 1252 - Ss ? 0:00 /usr/sbin/sshd |
#ps l -p 1
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 836 - Ss ? 0:09 init [2] |
#ps l -p 1
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 1 0 20 0 10648 836 - Ss ? 0:09 init [2] |
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22596 3264 - Ss+ pts/6 0:00 -bash 0 1001 23248 23004 20 0 7708 320 - S pts/6 0:00 sleep 1000 |
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22596 3264 - Ss+ pts/6 0:00 -bash 0 1001 23248 23004 20 0 7708 320 - S pts/6 0:00 sleep 1000 |
#kill 23248
|
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22596 3264 - Ss+ pts/6 0:00 -bash |
#kill 23280
|
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22784 3296 - Ss pts/6 0:00 -bash 0 1001 23280 23004 20 0 22184 2852 - S+ pts/6 0:00 bash 0 1001 23322 23280 20 0 7708 320 - S pts/6 0:00 sleep 1000 |
#kill -9 23280
|
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1764 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22784 3296 - Ss+ pts/6 0:00 -bash 0 1001 23322 1 20 0 7708 320 - S pts/6 0:00 sleep 1000 |
#ps ax -o "%a %u %U %y"
COMMAND RUSER USER TTY init [2] root root ? [kthreadd] root root ? [ksoftirqd/0] root root ? [kworker/u:0] root root ? [migration/0] root root ? [watchdog/0] root root ? [cpuset] root root ? [khelper] root root ? [kdevtmpfs] root root ? ... sshd: root@pts/4 root root ? -bash root root pts/4 script -f -c l3script -q /r root root pts/4 script -f -c l3script -q /r root root pts/4 l3script root root pts/5 sshd: student [priv] root root ? sshd: student@pts/6 student student ? -bash student student pts/6 sleep 1000 student student pts/6 ps ax -o %a %u %U %y root root pts/5 |
#ps ax -o "%a %u %U %y"
COMMAND RUSER USER TTY init [2] root root ? [kthreadd] root root ? [ksoftirqd/0] root root ? [kworker/u:0] root root ? [migration/0] root root ? [watchdog/0] root root ? [cpuset] root root ? [khelper] root root ? [kdevtmpfs] root root ? ... -bash root root pts/4 script -f -c l3script -q /r root root pts/4 script -f -c l3script -q /r root root pts/4 l3script root root pts/5 sshd: student [priv] root root ? sshd: student@pts/6 student student ? -bash student student pts/6 sleep 1000 student student pts/6 passwd student root pts/6 ps ax -o %a %u %U %y root root pts/5 |
#ps ax -o "%a %u %U %y" | awk '$2!=$3'
COMMAND RUSER USER TTY init [2] root root ? udevd --daemon root root ? /usr/sbin/rsyslogd -c5 root root ? /usr/sbin/exim4 -bd -q30m 101 101 ? /sbin/getty 38400 tty1 root root tty1 /sbin/getty 38400 tty2 root root tty2 /sbin/getty 38400 tty3 root root tty3 /sbin/getty 38400 tty4 root root tty4 /sbin/getty 38400 tty5 root root tty5 ... pager -s root root pts/3 sshd: root@pts/4 root root ? script -f -c l3script -q /r root root pts/4 script -f -c l3script -q /r root root pts/4 sshd: student [priv] root root ? sshd: student@pts/6 student student ? sleep 1000 student student pts/6 passwd student root pts/6 ps ax -o %a %u %U %y root root pts/5 awk $2!=$3 root root pts/5 |
#ps ax -o "%u %U %y %a" | awk '$2!=$3'
RUSER USER TTY COMMAND root root ? init [2] root root ? [kthreadd] root root ? [ksoftirqd/0] root root ? [kworker/u:0] root root ? [migration/0] root root ? [watchdog/0] root root ? [cpuset] root root ? [khelper] root root ? [kdevtmpfs] ... root root pts/4 script -f -c l3script -q /root/.lilalo//1283021757248215014-1414132290.script root root pts/4 script -f -c l3script -q /root/.lilalo//1283021757248215014-1414132290.script root root pts/5 l3script root root ? sshd: student [priv] student student ? sshd: student@pts/6 student student pts/6 -bash student student pts/6 sleep 1000 student root pts/6 passwd root root pts/5 ps ax -o %u %U %y %a root root pts/5 awk $2!=$3 |
#ps ax -o "%u %U %y %a" | awk '$1!=$2'
RUSER USER TTY COMMAND student root pts/6 passwd |
#top
top - 10:25:11 up 6 days, 15:42, 2 users, load average: 0,00, 0,01, 0,05 Tasks: 63 total, 2 running, 61 sleeping, 0 stopped, 0 zombie %Cpu(s): 1,3 us, 0,0 sy, 0,0 ni, 98,7 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 507368 total, 399856 used, 107512 free, 141524 buffers KiB Swap: 0 total, 0 used, 0 free, 139800 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 10648 836 696 S 0,0 0,2 0:09.39 init 2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0,0 0,0 0:03.94 ksoftirqd/0 5 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kworker/u:0 ... 146 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 ext4-dio-unwrit 289 root 20 0 21248 1220 784 S 0,0 0,2 0:00.04 udevd 407 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kpsmoused 1918 root 20 0 52772 1632 1204 S 0,0 0,3 0:00.07 rsyslogd 1948 root 20 0 4116 656 512 S 0,0 0,1 0:00.00 acpid 1990 root 20 0 22492 892 688 S 0,0 0,2 0:00.79 cron 2263 Debian-e 20 0 46808 1036 584 S 0,0 0,2 0:00.17 exim4 2296 root 20 0 49932 1252 640 S 0,0 0,2 0:00.02 sshd 2320 root 20 0 18368 972 812 S 0,0 0,2 0:00.04 getty 2321 root 20 0 18368 972 812 S 0,0 0,2 0:00.00 getty |
#\top help
procps-ng version 3.3.3 usage: top -hv | -bcHiSs -d delay -n limit -u|U user | -p pid[,pid] -w [cols] |
#top help
procps-ng version 3.3.3 usage: top -hv | -bcHiSs -d delay -n limit -u|U user | -p pid[,pid] -w [cols] |
#help top
![]() l3script: help: no help topics match `top'. Try `help help' or `man -k top' or `info top'. |
#man help
![]() |
#man top
|
#top
top - 10:27:19 up 6 days, 15:44, 2 users, load average: 0,15, 0,07, 0,06 Tasks: 63 total, 1 running, 62 sleeping, 0 stopped, 0 zombie %Cpu(s): 0,0 us, 0,3 sy, 0,0 ni, 99,7 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 507368 total, 400376 used, 106992 free, 141548 buffers KiB Swap: 0 total, 0 used, 0 free, 140080 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 20 0 10648 836 696 S 0,0 0,2 0:09.39 init 2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0,0 0,0 0:03.94 ksoftirqd/0 5 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kworker/u:0 ... 3368 root 20 0 74680 31m 1724 S 0,0 6,3 30:10.64 l3-agent 22885 root 20 0 71292 3696 2896 S 0,0 0,7 0:00.29 sshd 23472 root 20 0 25284 1548 1128 R 0,3 0,3 0:00.03 top top - 10:28:43 up 6 days, 15:45, 2 users, load average: 0,09, 0,07, 0,06 %Cpu(s): 0,0 us, 0,3 sy, 0,0 ni, 99,7 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st KiB Mem: 507368 total, 400352 used, 107016 free, 141556 buffers KiB Swap: 0 total, 0 used, 0 free, 140148 cached 23472 root 20 0 25284 1548 1128 R 0,0 0,3 0:00.03 top 3368 root 20 0 74680 31m 1724 S 0,0 6,3 30:12.55 l3-agent 22963 root 20 0 18168 472 308 S 0,3 0,1 0:00.11 script |
#fuser -v ~student/test
![]() |
#fuser -v ~student/test
![]() |
#fuser -v ~student/test.swp
Указанное имя файла /home/student/test.swp не существует. |
#fuser -v /lib/x86_64-linux-gnu/libpam
![]() libpamc.so.0 libpam_misc.so.0 libpam.so.0 libpamc.so.0.82.1 libpam_misc.so.0.82.0 libpam.so.0.83.0 |
#fuser -v /lib/x86_64-linux-gnu/libpam
![]() libpamc.so.0 libpam_misc.so.0 libpam.so.0 libpamc.so.0.82.1 libpam_misc.so.0.82.0 libpam.so.0.83.0 |
#fuser -v /lib/x86_64-linux-gnu/libpam.so.0
ÐÐÐID ÐÐСТУРÐÐÐÐÐÐÐ /lib/x86_64-linux-gnu/libpam.so.0.83.0: root 1990 ....m cron root 2296 ....m sshd root 22885 ....m sshd root 23001 ....m sshd student 23003 ....m sshd root 23496 ....m passwd |
#man useradd
|
#kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1 64) SIGRTMAX |
#kill -l1
![]() l3script: kill: l1: недопустимая спецификация сигнала |
#kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1 64) SIGRTMAX |
#cat /proc/sys/kernel
![]() cat: /proc/sys/kernel: Это каталог |
#cat /proc/sys/kernel/
![]() acct hung_task_warnings perf_event_max_sample_rate sched_rt_period_us acpi_video_flags io_delay_type perf_event_mlock_kb sched_rt_runtime_us auto_msgmni keys/ perf_event_paranoid sched_shares_window blk_iopoll kptr_restrict pid_max sched_time_avg bootloader_type kstack_depth_to_print poweroff_cmd sched_tunable_scaling bootloader_version max_lock_depth print-fatal-signals sched_wakeup_granularity_ns cad_pid modprobe printk sem cap_last_cap modules_disabled printk_delay shmall compat-log msgmax printk_ratelimit shmmax core_pattern msgmnb printk_ratelimit_burst shmmni core_pipe_limit msgmni pty/ shm_rmid_forced core_uses_pid ngroups_max random/ softlockup_panic ctrl-alt-del nmi_watchdog randomize_va_space sysrq dmesg_restrict osrelease real-root-dev tainted domainname ostype sched_autogroup_enabled threads-max ftrace_dump_on_oops overflowgid sched_child_runs_first timer_migration hostname overflowuid sched_domain/ unknown_nmi_panic hotplug panic sched_latency_ns usermodehelper/ hung_task_check_count panic_on_io_nmi sched_migration_cost version hung_task_panic panic_on_oops sched_min_granularity_ns watchdog hung_task_timeout_secs panic_on_unrecovered_nmi sched_nr_migrate watchdog_thresh |
#cat /proc/sys/kernel/pid_max
32768 |
#~
|
#vi /etc/sysctl.conf
--- /tmp/l3-saved-22964.755.10789 2014-10-24 10:56:44.737044760 +0300 +++ /etc/sysctl.conf 2014-10-24 10:59:07.321052328 +0300 @@ -7,7 +7,8 @@ #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console -#kernel.printk = 3 4 1 3 +#kernen.nrintk = 3 4 1 3 +kernel.pid_max = 65536 ##############################################################3 # Functions previously found in netbase |
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 20 0 71292 1876 - S ? 0:00 sshd: student@pts/6 0 1001 23004 23003 20 0 22784 3356 - Ss pts/6 0:00 -bash 0 1001 23585 23004 20 0 22184 2780 - S pts/6 0:00 bash 0 1001 23689 23585 20 0 22184 2784 - S+ pts/6 0:00 bash |
#kill -1 23585
|
#echo $?
0 |
#netstat -tan
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 448 192.168.13.4:22 192.168.15.102:53169 ESTABLISHED tcp 0 0 192.168.13.4:22 192.168.15.102:59901 ESTABLISHED tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:25 :::* LISTEN |
#netstat -tanp
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2296/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2263/exim4 tcp 0 464 192.168.13.4:22 192.168.15.102:53169 ESTABLISHED 22885/4 tcp 0 0 192.168.13.4:22 192.168.15.102:59901 ESTABLISHED 23001/sshd: student tcp6 0 0 :::22 :::* LISTEN 2296/sshd tcp6 0 0 ::1:25 :::* LISTEN 2263/exim4 |
#мvi /etc/ssh/ssh
![]() ssh_config ssh_host_dsa_key ssh_host_ecdsa_key ssh_host_rsa_key sshd_config ssh_host_dsa_key.pub ssh_host_ecdsa_key.pub ssh_host_rsa_key.pub |
#vi /etc/ssh/sshd_config
--- /tmp/l3-saved-22964.9213.17071 2014-10-24 11:06:13.061037982 +0300 +++ /etc/ssh/sshd_config 2014-10-24 11:07:58.769042730 +0300 @@ -5,7 +5,7 @@ Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: -#ListenAddress 0.0.0.0 +ListenAddress 192.168.13.4 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:00:00:04 inet addr:192.168.13.4 Bcast:192.168.13.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe00:4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:293961 errors:0 dropped:0 overruns:0 frame:0 TX packets:381077 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:28257646 (26.9 MiB) TX bytes:82432575 (78.6 MiB) Interrupt:72 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
#vi /etc/ssh/sshd_config
|
#kill -l 2296
![]() l3script: kill: 2296: недопустимая спецификация сигнала |
#kill -1 2296
|
#ÑÑкÐservice ssh
![]() [info] Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}. |
#cat /etc/init.d/ssh
#! /bin/sh ### BEGIN INIT INFO # Provides: sshd # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: OpenBSD Secure Shell server ### END INIT INFO set -e ... esac ;; status) status_of_proc -p /var/run/sshd.pid /usr/sbin/sshd sshd && exit 0 || exit $? ;; *) log_action_msg "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}" || true exit 1 esac exit 0 |
#зы дф
![]() l3script: $'\320\267\321\213': команда не найдена |
#ps la
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 2320 1 20 0 18368 972 - Ss+ tty1 0:00 /sbin/getty 38400 tty1 4 0 2321 1 20 0 18368 972 - Ss+ tty2 0:00 /sbin/getty 38400 tty2 4 0 2322 1 20 0 18368 968 - Ss+ tty3 0:00 /sbin/getty 38400 tty3 4 0 2323 1 20 0 18368 976 - Ss+ tty4 0:00 /sbin/getty 38400 tty4 4 0 2324 1 20 0 18368 972 - Ss+ tty5 0:00 /sbin/getty 38400 tty5 4 0 2325 1 20 0 18368 964 - Ss+ tty6 0:00 /sbin/getty 38400 tty6 4 0 9541 9540 20 0 24104 2616 - Ss pts/1 0:00 l3script 1 0 10519 9541 20 0 24104 1312 - S+ pts/1 0:00 l3script 0 0 10527 10519 20 0 33732 2980 - S+ pts/1 0:00 /usr/bin/vim 1.txt 2.txt 0 0 18523 18522 20 0 23992 2524 - Ss pts/3 0:00 l3script 0 0 19230 18523 20 0 18720 1628 - S+ pts/3 0:00 man test 0 0 19239 19230 20 0 10048 912 - S+ pts/3 0:00 pager -s 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215 4 0 22964 22963 20 0 23928 2580 - Ss pts/5 0:00 l3script 0 1001 23004 23003 20 0 22784 3368 - Ss+ pts/6 0:00 -bash 4 0 23943 22964 20 0 10536 844 - R+ pts/5 0:00 ps la |
#nice -n -3 sleep 1000 &
[1] 23951 |
#renice 5 23951
23951 (process ID) old priority -3, new priority 5 |
#ps la
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 2320 1 20 0 18368 972 - Ss+ tty1 0:00 /sbin/getty 38400 tty1 4 0 2321 1 20 0 18368 972 - Ss+ tty2 0:00 /sbin/getty 38400 tty2 4 0 2322 1 20 0 18368 968 - Ss+ tty3 0:00 /sbin/getty 38400 tty3 4 0 2323 1 20 0 18368 976 - Ss+ tty4 0:00 /sbin/getty 38400 tty4 4 0 2324 1 20 0 18368 972 - Ss+ tty5 0:00 /sbin/getty 38400 tty5 4 0 2325 1 20 0 18368 964 - Ss+ tty6 0:00 /sbin/getty 38400 tty6 4 0 9541 9540 20 0 24104 2616 - Ss pts/1 0:00 l3script 1 0 10519 9541 20 0 24104 1312 - S+ pts/1 0:00 l3script 0 0 10527 10519 20 0 33732 2980 - S+ pts/1 0:00 /usr/bin/vim 1.txt 2.txt 0 0 18523 18522 20 0 23992 2524 - Ss pts/3 0:00 l3script 0 0 19230 18523 20 0 18720 1628 - S+ pts/3 0:00 man test 0 0 19239 19230 20 0 10048 912 - S+ pts/3 0:00 pager -s 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215 4 0 22964 22963 20 0 23928 2580 - Ss pts/5 0:00 l3script 0 1001 23004 23003 20 0 22784 3368 - Ss+ pts/6 0:00 -bash 4 0 23951 22964 25 5 7708 324 - SN pts/5 0:00 sleep 1000 4 0 23977 22964 20 0 10536 836 - R+ pts/5 0:00 ps la |
#ps la | awk '$6>0'
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 23951 22964 25 5 7708 324 - SN pts/5 0:00 sleep 1000 |
#ps la | awk '$10~/N/'
4 0 23951 22964 25 5 7708 324 - SN pts/5 0:00 sleep 1000 |
#renice 5 -u student
1001 (user ID) old priority 0, new priority 5 |
#ps la
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 2320 1 20 0 18368 972 - Ss+ tty1 0:00 /sbin/getty 38400 tty1 4 0 2321 1 20 0 18368 972 - Ss+ tty2 0:00 /sbin/getty 38400 tty2 4 0 2322 1 20 0 18368 968 - Ss+ tty3 0:00 /sbin/getty 38400 tty3 4 0 2323 1 20 0 18368 976 - Ss+ tty4 0:00 /sbin/getty 38400 tty4 4 0 2324 1 20 0 18368 972 - Ss+ tty5 0:00 /sbin/getty 38400 tty5 4 0 2325 1 20 0 18368 964 - Ss+ tty6 0:00 /sbin/getty 38400 tty6 4 0 9541 9540 20 0 24104 2616 - Ss pts/1 0:00 l3script 1 0 10519 9541 20 0 24104 1312 - S+ pts/1 0:00 l3script 0 0 10527 10519 20 0 33732 2980 - S+ pts/1 0:00 /usr/bin/vim 1.txt 2.txt 0 0 18523 18522 20 0 23992 2524 - Ss pts/3 0:00 l3script 0 0 19230 18523 20 0 18720 1628 - S+ pts/3 0:00 man test 0 0 19239 19230 20 0 10048 912 - S+ pts/3 0:00 pager -s 4 0 22887 22885 20 0 22180 2808 - Ss pts/4 0:00 -bash 0 0 22932 22887 20 0 18164 844 - S+ pts/4 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215 1 0 22963 22932 20 0 18168 472 - S+ pts/4 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215 4 0 22964 22963 20 0 23928 2580 - Ss pts/5 0:00 l3script 0 1001 23004 23003 25 5 22784 3368 - SNs+ pts/6 0:00 -bash 4 0 23951 22964 25 5 7708 324 - SN pts/5 0:00 sleep 1000 4 0 24011 22964 20 0 10536 840 - R+ pts/5 0:00 ps la |
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 23003 23001 25 5 71292 1876 - SN ? 0:00 sshd: student@pts/6 0 1001 23004 23003 25 5 22784 3368 - SNs+ pts/6 0:00 -bash |
#ps l -U student
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 5 1001 24030 24028 20 0 71292 1760 - S ? 0:00 sshd: student@pts/6 0 1001 24031 24030 20 0 22596 3196 - Ss+ pts/6 0:00 -bash |
#ls /lib/x86_64-linux-gnu/security/
pam_access.so pam_faildelay.so pam_lastlog.so pam_mkhomedir.so pam_rhosts.so pam_stress.so pam_umask.so pam_debug.so pam_filter.so pam_limits.so pam_motd.so pam_rootok.so pam_succeed_if.so pam_unix.so pam_deny.so pam_ftp.so pam_listfile.so pam_namespace.so pam_securetty.so pam_tally2.so pam_userdb.so pam_echo.so pam_group.so pam_localuser.so pam_nologin.so pam_selinux.so pam_tally.so pam_warn.so pam_env.so pam_issue.so pam_loginuid.so pam_permit.so pam_sepermit.so pam_time.so pam_wheel.so pam_exec.so pam_keyinit.so pam_mail.so pam_pwhistory.so pam_shells.so pam_timestamp.so pam_xauth.so |
#vi /etc/security/limits.conf
--- /tmp/l3-saved-22964.20628.22917 2014-10-24 11:53:27.797045260 +0300 +++ /etc/security/limits.conf 2014-10-24 11:55:47.645057174 +0300 @@ -51,6 +51,7 @@ #@faculty hard nproc 50 #ftp hard nproc 0 #ftp - chroot /ftp +student hard priority 5 #@student - maxlogins 4 # End of file |
#less /etc/pam.d/login
|
#ps
PID TTY TIME CMD 22964 pts/5 00:00:00 l3script 24240 pts/5 00:00:00 ps [1]+ Done nice -n -3 sleep 1000 |
#jobs
|
#ps lax | awk '$13~/sleep/'
|
#echo $?
0 |
#ps lax | awk '$13=/sleep/'
0 0 24280 22964 20 0 6760 604 - S+ pts/5 0:00 1 $13=/sleep/ |
#ps
PID TTY TIME CMD 22964 pts/5 00:00:00 l3script 24288 pts/5 00:00:00 ps |
#ps
PID TTY TIME CMD 22964 pts/5 00:00:00 l3script 24296 pts/5 00:00:00 ps |
#ps -x
warning: bad ps syntax, perhaps a bogus '-'? See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ PID TTY STAT TIME COMMAND 1 ? Ss 0:09 init [2] 2 ? S 0:00 [kthreadd] 3 ? S 0:03 [ksoftirqd/0] 5 ? S 0:00 [kworker/u:0] 6 ? S 0:00 [migration/0] 7 ? S 0:05 [watchdog/0] 8 ? S< 0:00 [cpuset] ... 19230 pts/3 S+ 0:00 man test 19239 pts/3 S+ 0:00 pager -s 22885 ? Ss 0:00 sshd: root@pts/4 22887 pts/4 Ss 0:00 -bash 22932 pts/4 S+ 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-1414132290.script 22963 pts/4 S+ 0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-1414132290.script 22964 pts/5 Ss 0:00 l3script 23868 ? Ss 0:00 /usr/sbin/sshd 24146 ? SNs 0:00 sshd: student [priv] 24304 pts/5 R+ 0:00 ps -x |
#ps lax | awk -F: '$13=/sleep/'
0 0 24336 22964 20 0 6760 600 - S+ pts/5 0 00 awk -F $13=/sleep/ 1 |
#man awk
|
#ps lax | awk -F: '$13~/l3script/'
|
#echo $?
0 |
#ps U student
PID TTY STAT TIME COMMAND 24148 ? SN 0:00 sshd: student@pts/6 24149 pts/6 SNs+ 0:00 -bash |