/l3/users/Illia-fuck2you/voip-lab-11-2013/linux1.unix.nt/root :1 :2 :3 :4 |
|
#date
Mon Nov 18 14:21:03 EET 2013 |
##wtf
|
##fuckyou
|
#nano /v
|
#nano /v
|
#nano /var/lo
|
#nano /var/lo
|
#nano /var/log/
|
#nano /var/log/
|
#nano /var/log/messages
--- /tmp/l3-saved-7915.26740.11509 2013-11-18 14:26:27.586654182 +0200 +++ /var/log/messages 2013-11-18 14:26:49.342653888 +0200 @@ -602,3 +602,4 @@ Nov 18 14:19:11 linux1 rsyslogd-2177: imuxsock begins to drop messages from pid 5046 due to rate-limiting Nov 18 14:21:13 linux1 rsyslogd-2177: imuxsock lost 805 messages from pid 3366 due to rate-limiting Nov 18 14:21:13 linux1 rsyslogd-2177: imuxsock lost 555 messages from pid 5046 due to rate-limiting +#estsrytdy45eojeiopjropwekropekoprk |
#nano /var/log/messages
--- /tmp/l3-saved-7915.8205.22091 2013-11-18 14:27:07.826653643 +0200 +++ /var/log/messages 2013-11-18 14:27:17.406653512 +0200 @@ -602,4 +602,3 @@ Nov 18 14:19:11 linux1 rsyslogd-2177: imuxsock begins to drop messages from pid 5046 due to rate-limiting Nov 18 14:21:13 linux1 rsyslogd-2177: imuxsock lost 805 messages from pid 3366 due to rate-limiting Nov 18 14:21:13 linux1 rsyslogd-2177: imuxsock lost 555 messages from pid 5046 due to rate-limiting -#estsrytdy45eojeiopjropwekropekoprk |
#dpkg -l | wc -l
1456 |
#apt-get serch asterisk
E: Invalid operation serch |
#apt-get search asterisk
E: Invalid operation search |
#apt-cache search asterisk
asterisk - Open Source Private Branch Exchange (PBX) asterisk-config - Configuration files for Asterisk asterisk-dahdi - DAHDI devices support for the Asterisk PBX asterisk-dbg - Debugging symbols for Asterisk asterisk-dev - Development files for Asterisk asterisk-doc - Source code documentation for Asterisk asterisk-mobile - Bluetooth phone support for the Asterisk PBX asterisk-modules - loadable modules for the Asterisk PBX asterisk-mp3 - MP3 playback support for the Asterisk PBX asterisk-mysql - MySQL database protocol support for the Asterisk PBX ... linphone-dbg - Debugging symbols for linphone and its libraries op-panel - switchboard type application for the Asterisk PBX libopenr2-3 - MFC/R2 (telephony) call setup library python-asterisk - Asterisk Manager API interface module for Python libsipwitch-dev - secure peer-to-peer SIP VoIP server - development files libsipwitch1 - secure peer-to-peer SIP VoIP server - development files libsipwitch1-dbg - secure peer-to-peer SIP VoIP server - development files sipwitch - secure peer-to-peer VoIP server for the SIP protocol sipwitch-cgi - secure peer-to-peer SIP VoIP server - CGI XML-RPC interface python-starpy - Asterisk (AMI) protocols for Twisted Python |
#. /etc/bash_completion
|
#netstat -lnp | grep 9999
|
#netstat -lnp | grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3284/sshd tcp6 0 0 :::22 :::* LISTEN 3284/sshd unix 2 [ ACC ] STREAM LISTENING 52051 13759/pulseaudio /tmp/pulse-nuOdMqjwEN22/native unix 2 [ ACC ] STREAM LISTENING 52889 13759/pulseaudio /tmp/pulse-nuOdMqjwEN22/dbus-socket unix 2 [ ACC ] STREAM LISTENING 5062 2220/acpid /var/run/acpid.socket |
#netstat -lnp | grep *
grep: libgksu-pvtGUA: Is a directory grep: mc-root: Is a directory grep: orbit-user: Is a directory grep: pulse-nuOdMqjwEN22: Is a directory grep: pulse-t9upJ4g7YdpD: Is a directory grep: ssh-TI9oBOmTnG4l: Is a directory grep: tracker-user: Is a directory |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1817/rpcbind tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3284/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2529/exim4 tcp 0 0 0.0.0.0:36603 0.0.0.0:* LISTEN 1848/rpc.statd tcp6 0 0 :::111 :::* LISTEN 1817/rpcbind tcp6 0 0 :::58994 :::* LISTEN 1848/rpc.statd tcp6 0 0 :::22 :::* LISTEN 3284/sshd tcp6 0 0 ::1:25 :::* LISTEN 2529/exim4 ... unix 2 [ ACC ] STREAM LISTENING 52015 13741/gnome-keyring /home/user/.cache/keyring-UWBpeW/gpg unix 2 [ ACC ] STREAM LISTENING 6698 1817/rpcbind /var/run/rpcbind.sock unix 2 [ ACC ] STREAM LISTENING 54418 13685/x-session-man @/tmp/.ICE-unix/13685 unix 2 [ ACC ] STREAM LISTENING 53496 13466/gdm-simple-sl @/tmp/gdm-session-LwUABDss unix 2 [ ACC ] STREAM LISTENING 40534 5649/avahi-daemon: /var/run/avahi-daemon/socket unix 2 [ ACC ] STREAM LISTENING 53484 13478/Xorg @/tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 42340 7001/minissdpd /var/run/minissdpd.sock unix 2 [ ACC ] STREAM LISTENING 53742 13729/dbus-daemon @/tmp/dbus-dxC1ydKwQt unix 2 [ ACC ] STREAM LISTENING 5062 2220/acpid /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 41710 4426/bluetoothd /var/run/sdp |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1817/rpcbind tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3284/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2529/exim4 tcp 0 0 0.0.0.0:36603 0.0.0.0:* LISTEN 1848/rpc.statd tcp6 0 0 :::111 :::* LISTEN 1817/rpcbind tcp6 0 0 :::58994 :::* LISTEN 1848/rpc.statd tcp6 0 0 :::22 :::* LISTEN 3284/sshd tcp6 0 0 ::1:25 :::* LISTEN 2529/exim4 ... unix 2 [ ACC ] STREAM LISTENING 52015 13741/gnome-keyring /home/user/.cache/keyring-UWBpeW/gpg unix 2 [ ACC ] STREAM LISTENING 6698 1817/rpcbind /var/run/rpcbind.sock unix 2 [ ACC ] STREAM LISTENING 54418 13685/x-session-man @/tmp/.ICE-unix/13685 unix 2 [ ACC ] STREAM LISTENING 53496 13466/gdm-simple-sl @/tmp/gdm-session-LwUABDss unix 2 [ ACC ] STREAM LISTENING 40534 5649/avahi-daemon: /var/run/avahi-daemon/socket unix 2 [ ACC ] STREAM LISTENING 53484 13478/Xorg @/tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 42340 7001/minissdpd /var/run/minissdpd.sock unix 2 [ ACC ] STREAM LISTENING 53742 13729/dbus-daemon @/tmp/dbus-dxC1ydKwQt unix 2 [ ACC ] STREAM LISTENING 5062 2220/acpid /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 41710 4426/bluetoothd /var/run/sdp |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1817/rpcbind tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3284/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2529/exim4 tcp 0 0 0.0.0.0:36603 0.0.0.0:* LISTEN 1848/rpc.statd tcp6 0 0 :::111 :::* LISTEN 1817/rpcbind tcp6 0 0 :::58994 :::* LISTEN 1848/rpc.statd tcp6 0 0 :::22 :::* LISTEN 3284/sshd tcp6 0 0 ::1:25 :::* LISTEN 2529/exim4 ... unix 2 [ ACC ] STREAM LISTENING 52015 13741/gnome-keyring /home/user/.cache/keyring-UWBpeW/gpg unix 2 [ ACC ] STREAM LISTENING 6698 1817/rpcbind /var/run/rpcbind.sock unix 2 [ ACC ] STREAM LISTENING 54418 13685/x-session-man @/tmp/.ICE-unix/13685 unix 2 [ ACC ] STREAM LISTENING 53496 13466/gdm-simple-sl @/tmp/gdm-session-LwUABDss unix 2 [ ACC ] STREAM LISTENING 40534 5649/avahi-daemon: /var/run/avahi-daemon/socket unix 2 [ ACC ] STREAM LISTENING 53484 13478/Xorg @/tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 42340 7001/minissdpd /var/run/minissdpd.sock unix 2 [ ACC ] STREAM LISTENING 53742 13729/dbus-daemon @/tmp/dbus-dxC1ydKwQt unix 2 [ ACC ] STREAM LISTENING 5062 2220/acpid /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 41710 4426/bluetoothd /var/run/sdp |
#dpkg -l asterisk
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii asterisk 1:1.8.13.1~d amd64 Open Source Private Branch Exchan |
##Starting Asterisk PBX: asterisk.
|
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart. |
#runlevel
N 2 |
#update-rc.d
update-rc.d: using dependency based boot sequencing update-rc.d: error: not enough arguments usage: update-rc.d [-n] [-f] <basename> remove update-rc.d [-n] <basename> defaults [NN | SS KK] update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] . update-rc.d [-n] <basename> disable|enable [S|2|3|4|5] -n: not really -f: force The disable|enable API is not stable and might change in the future. |
#dpkg -L asterisk | grep default
/etc/default /etc/default/asterisk |
#ps aux | wc -l
157 |
#ps aux | less
|
#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 -1 asterisk
l3script: kill: asterisk: arguments must be process or job IDs |
#pstree | less
|
#netstat -lnp | grep asterisk
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 25101/asterisk tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 25101/asterisk udp 0 0 0.0.0.0:4520 0.0.0.0:* 25101/asterisk udp 0 0 0.0.0.0:4569 0.0.0.0:* 25101/asterisk udp 0 0 0.0.0.0:5000 0.0.0.0:* 25101/asterisk udp 0 0 0.0.0.0:5060 0.0.0.0:* 25101/asterisk unix 2 [ ACC ] STREAM LISTENING 313352 25101/asterisk /var/run/asterisk/asterisk.ctl |
#rasterisk
Asterisk 1.8.13.1~dfsg-3+deb7u1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux1 (pid = 25101) linux1*CLI> sip show pe peers peer linux1*CLI> sip show peer peers peer linux1*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] linux1*CLI> sip show registry Host dnsmgr Username Refresh State Reg.Time 0 SIP registrations. linux1*CLI> Disconnected from Asterisk server |
#dpkg -L asterisk-modules | sort | less
|
#mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.SAVED
|
#nano /etc/asterisk/sip.conf
|
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-7915.16446.16803 2013-11-18 16:56:17.910533733 +0200 +++ /etc/asterisk/sip.conf 2013-11-18 16:56:50.222533303 +0200 @@ -1,13 +1,11 @@ context=default | | -[1101] | - | +[1101] | | type=friend | secret=1234 | host=dynamic -[1102] | - | +[1102] | | type=friend | secret=1234 | host=dynamic |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-7915.18922.24680 2013-11-18 16:58:45.106531762 +0200 +++ /etc/asterisk/sip.conf 2013-11-18 16:58:57.998531588 +0200 @@ -1,3 +1,4 @@ +[general] context=default | | [1101] | | |
#ls -l /etc/asterisk/sip.conf
-rw-r--r-- 1 root root 834 Nov 18 16:58 /etc/asterisk/sip.conf |
#ls -l /etc/asterisk/sip.conf
-rw-r--r-- 1 root root 834 Nov 18 16:58 /etc/asterisk/sip.conf |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-7915.9324.18185 2013-11-18 17:05:20.082526472 +0200 +++ /etc/asterisk/sip.conf 2013-11-18 17:05:59.882525938 +0200 @@ -1,11 +1,11 @@ [general] context=default | -for i in `seq 1101 1199` | +for i in `seq 101 199` | do cat <<EOF -[1101] | +[1$i] | type=friend | secret=1234 | host=dynamic | |
#[general]
|
#vim /etc/asterisk/sip.conf
|
#[general]
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-7915.967.14172 2013-11-18 17:15:50.270518027 +0200 +++ /etc/asterisk/sip.conf 2013-11-18 17:17:02.790517052 +0200 @@ -1,15 +1,500 @@ [general] context=default | -for i in `seq 101 199` | -do -cat <<EOF - -[1$i] | -type=friend | -secret=1234 | -host=dynamic | -EOF | -done + +[1101] +type=friend +secret=1234 +host=dynamic + +[1102] +type=friend +secret=1234 +host=dynamic + +[1103] +type=friend +secret=1234 +host=dynamic + +[1104] +type=friend +secret=1234 +host=dynamic + +[1105] +type=friend +secret=1234 +host=dynamic + +[1106] +type=friend +secret=1234 +host=dynamic + +[1107] +type=friend +secret=1234 +host=dynamic + +[1108] +type=friend +secret=1234 +host=dynamic + +[1109] +type=friend +secret=1234 +host=dynamic + +[1110] +type=friend +secret=1234 +host=dynamic + +[1111] +type=friend +secret=1234 +host=dynamic + +[1112] +type=friend +secret=1234 +host=dynamic + +[1113] +type=friend +secret=1234 +host=dynamic + +[1114] +type=friend +secret=1234 +host=dynamic + +[1115] +type=friend +secret=1234 +host=dynamic + +[1116] +type=friend +secret=1234 +host=dynamic + +[1117] +type=friend +secret=1234 +host=dynamic + +[1118] +type=friend +secret=1234 +host=dynamic + +[1119] +type=friend +secret=1234 +host=dynamic + +[1120] +type=friend +secret=1234 +host=dynamic + +[1121] +type=friend +secret=1234 +host=dynamic + +[1122] +type=friend +secret=1234 +host=dynamic + +[1123] +type=friend +secret=1234 +host=dynamic + +[1124] +type=friend +secret=1234 +host=dynamic + +[1125] +type=friend +secret=1234 +host=dynamic + +[1126] +type=friend +secret=1234 +host=dynamic + +[1127] +type=friend +secret=1234 +host=dynamic + +[1128] +type=friend +secret=1234 +host=dynamic + +[1129] +type=friend +secret=1234 +host=dynamic + +[1130] +type=friend +secret=1234 +host=dynamic + +[1131] +type=friend +secret=1234 +host=dynamic + +[1132] +type=friend +secret=1234 +host=dynamic + +[1133] +type=friend +secret=1234 +host=dynamic + +[1134] +type=friend +secret=1234 +host=dynamic + +[1135] +type=friend +secret=1234 +host=dynamic + +[1136] +type=friend +secret=1234 +host=dynamic + +[1137] +type=friend +secret=1234 +host=dynamic + +[1138] +type=friend +secret=1234 +host=dynamic + +[1139] +type=friend +secret=1234 +host=dynamic + +[1140] +type=friend +secret=1234 +host=dynamic + +[1141] +type=friend +secret=1234 +host=dynamic + +[1142] +type=friend +secret=1234 +host=dynamic + +[1143] +type=friend +secret=1234 +host=dynamic + +[1144] +type=friend +secret=1234 +host=dynamic + +[1145] +type=friend +secret=1234 +host=dynamic + +[1146] +type=friend +secret=1234 +host=dynamic + +[1147] +type=friend +secret=1234 +host=dynamic + +[1148] +type=friend +secret=1234 +host=dynamic + +[1149] +type=friend +secret=1234 +host=dynamic + +[1150] +type=friend +secret=1234 +host=dynamic + +[1151] +type=friend +secret=1234 +host=dynamic + +[1152] +type=friend +secret=1234 +host=dynamic + +[1153] +type=friend +secret=1234 +host=dynamic + +[1154] +type=friend +secret=1234 +host=dynamic + +[1155] +type=friend +secret=1234 +host=dynamic + +[1156] +type=friend +secret=1234 +host=dynamic + +[1157] +type=friend +secret=1234 +host=dynamic + +[1158] +type=friend +secret=1234 +host=dynamic + +[1159] +type=friend +secret=1234 +host=dynamic + +[1160] +type=friend +secret=1234 +host=dynamic + +[1161] +type=friend +secret=1234 +host=dynamic + +[1162] +type=friend +secret=1234 +host=dynamic + +[1163] +type=friend +secret=1234 +host=dynamic + +[1164] +type=friend +secret=1234 +host=dynamic + +[1165] +type=friend +secret=1234 +host=dynamic + +[1166] +type=friend +secret=1234 +host=dynamic + +[1167] +type=friend +secret=1234 +host=dynamic + +[1168] +type=friend +secret=1234 +host=dynamic + +[1169] +type=friend +secret=1234 +host=dynamic + +[1170] +type=friend +secret=1234 +host=dynamic + +[1171] +type=friend +secret=1234 +host=dynamic + +[1172] +type=friend +secret=1234 +host=dynamic + +[1173] +type=friend +secret=1234 +host=dynamic + +[1174] +type=friend +secret=1234 +host=dynamic + +[1175] +type=friend +secret=1234 +host=dynamic + +[1176] +type=friend +secret=1234 +host=dynamic + +[1177] +type=friend +secret=1234 +host=dynamic + +[1178] +type=friend +secret=1234 +host=dynamic + +[1179] +type=friend +secret=1234 +host=dynamic + +[1180] +type=friend +secret=1234 +host=dynamic + +[1181] +type=friend +secret=1234 +host=dynamic + +[1182] +type=friend +secret=1234 +host=dynamic + +[1183] +type=friend +secret=1234 +host=dynamic + +[1184] +type=friend +secret=1234 +host=dynamic + +[1185] +type=friend +secret=1234 +host=dynamic + +[1186] +type=friend +secret=1234 +host=dynamic + +[1187] +type=friend +secret=1234 +host=dynamic + +[1188] +type=friend +secret=1234 +host=dynamic + +[1189] +type=friend +secret=1234 +host=dynamic + +[1190] +type=friend +secret=1234 +host=dynamic + +[1191] +type=friend +secret=1234 +host=dynamic + +[1192] +type=friend +secret=1234 +host=dynamic + +[1193] +type=friend +secret=1234 +host=dynamic + +[1194] +type=friend +secret=1234 +host=dynamic + +[1195] +type=friend +secret=1234 +host=dynamic + +[1196] +type=friend +secret=1234 +host=dynamic + +[1197] +type=friend +secret=1234 +host=dynamic + +[1198] +type=friend +secret=1234 +host=dynamic + +[1199] +type=friend +secret=1234 +host=dynamic |
#[general]
Asterisk 1.8.13.1~dfsg-3+deb7u1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux1 (pid = 25101) linux1*CLI> reload [Nov 18 17:17:31] NOTICE[11842]: chan_skinny.c:7260 config_load: Configuring skinny from skinny.conf ... 1193 (Unspecified) D N 0 Unmonitored 1194 (Unspecified) D N 0 Unmonitored 1195 (Unspecified) D N 0 Unmonitored 1196 (Unspecified) D N 0 Unmonitored 1197 (Unspecified) D N 0 Unmonitored 1198 (Unspecified) D N 0 Unmonitored 1199 (Unspecified) D N 0 Unmonitored 99 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 99 offline] linux1*CLI> Disconnected from Asterisk server |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:30:42:dd inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe30:42dd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:715412 errors:0 dropped:0 overruns:0 frame:0 TX packets:113443 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:947214874 (903.3 MiB) TX bytes:8599355 (8.2 MiB) Interrupt:20 Memory:fe400000-fe420000 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:185 errors:0 dropped:0 overruns:0 frame:0 TX packets:185 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11128 (10.8 KiB) TX bytes:11128 (10.8 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:30:42:dd inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe30:42dd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:715490 errors:0 dropped:0 overruns:0 frame:0 TX packets:113482 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:947224090 (903.3 MiB) TX bytes:8603608 (8.2 MiB) Interrupt:20 Memory:fe400000-fe420000 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:185 errors:0 dropped:0 overruns:0 frame:0 TX packets:185 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11128 (10.8 KiB) TX bytes:11128 (10.8 KiB) |
#rasterisk
Asterisk 1.8.13.1~dfsg-3+deb7u1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux1 (pid = 25101) linux1*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status ... [Nov 18 17:21:52] NOTICE[14768]: pbx_ael.c:180 pbx_load_module: AEL load process: checked config file name '/etc/asterisk/extensions.ael'. [Nov 18 17:21:52] NOTICE[14768]: pbx_ael.c:187 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'. [Nov 18 17:21:52] NOTICE[14768]: pbx_ael.c:192 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'. [Nov 18 17:21:52] NOTICE[14768]: pbx_ael.c:195 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'. [Nov 18 17:21:52] NOTICE[14768]: app_queue.c:6476 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action. [Nov 18 17:21:52] NOTICE[14768]: res_config_ldap.c:1632 parse_config: No directory user found, anonymous binding as default. [Nov 18 17:21:52] ERROR[14768]: res_config_ldap.c:1658 parse_config: No directory URL or host found. [Nov 18 17:21:52] NOTICE[14768]: res_config_ldap.c:1592 reload: Cannot reload LDAP RealTime driver. linux1*CLI> Disconnected from Asterisk server |
#mv /etc/asterisk/extensions.conf{,.SAVED}
|
#find /usr/share/asterisk/sounds/ -name \*thanks\*
/usr/share/asterisk/sounds/en_US_f_Allison/demo-thanks.gsm |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7915.5770.17446 2013-11-18 17:32:56.022504284 +0200 +++ /etc/asterisk/extensions.conf 2013-11-18 17:33:19.182503977 +0200 @@ -1,4 +1,3 @@ -[default] | - | -exten => 4000,1,Answer | +[default] +exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) |
#nano /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/sip.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7915.15704.938 2013-11-18 18:12:16.966472653 +0200 +++ /etc/asterisk/extensions.conf 2013-11-18 18:12:24.718472550 +0200 @@ -1,9 +1,7 @@ [default] exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) - exten => 3301,1,Dial(SIP/3301) exten => 3302,1,Dial(SIP/3302) - exten => _33XX,1,Dial(SIP/${EXTEN} exten => _44XX,1,Dial(SIP/33${EXTEN:-2}) |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7915.4576.8857 2013-11-18 18:12:42.870472305 +0200 +++ /etc/asterisk/extensions.conf 2013-11-18 18:12:55.870472131 +0200 @@ -4,4 +4,4 @@ exten => 3301,1,Dial(SIP/3301) exten => 3302,1,Dial(SIP/3302) exten => _33XX,1,Dial(SIP/${EXTEN} -exten => _44XX,1,Dial(SIP/33${EXTEN:-2}) +exten => _44XX,1,Dial(SIP/33${EXTEN:2}) |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7915.5884.14829 2013-11-18 18:13:08.706471959 +0200 +++ /etc/asterisk/extensions.conf 2013-11-18 18:13:17.102471848 +0200 @@ -4,4 +4,4 @@ exten => 3301,1,Dial(SIP/3301) exten => 3302,1,Dial(SIP/3302) exten => _33XX,1,Dial(SIP/${EXTEN} -exten => _44XX,1,Dial(SIP/33${EXTEN:2}) +;exten => _44XX,1,Dial(SIP/33${EXTEN:2}) |
#rasterisk
Asterisk 1.8.13.1~dfsg-3+deb7u1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux1 (pid = 25101) linux1*CLI> reload [Nov 18 18:13:22] NOTICE[24977]: chan_skinny.c:7260 config_load: Configuring skinny from skinny.conf ... [Nov 18 18:13:22] NOTICE[24977]: pbx_ael.c:187 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'. [Nov 18 18:13:22] NOTICE[24977]: pbx_ael.c:192 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'. [Nov 18 18:13:22] NOTICE[24977]: pbx_ael.c:195 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'. [Nov 18 18:13:22] NOTICE[24977]: app_queue.c:6476 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action. [Nov 18 18:13:22] NOTICE[24977]: res_config_ldap.c:1632 parse_config: No directory user found, anonymous binding as default. [Nov 18 18:13:22] ERROR[24977]: res_config_ldap.c:1658 parse_config: No directory URL or host found. [Nov 18 18:13:22] NOTICE[24977]: res_config_ldap.c:1592 reload: Cannot reload LDAP RealTime driver. [Nov 18 18:13:22] WARNING[24977]: pbx_config.c:1555 pbx_load_config: No closing parenthesis found? 'Dial(SIP/${EXTEN}' at line 6 of extensions.conf linux1*CLI> Disconnected from Asterisk server |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7915.13177.24561 2013-11-18 18:13:27.698471706 +0200 +++ /etc/asterisk/extensions.conf 2013-11-18 18:13:39.918471540 +0200 @@ -3,5 +3,5 @@ exten => 4000,n,Playback(demo-thanks) exten => 3301,1,Dial(SIP/3301) exten => 3302,1,Dial(SIP/3302) -exten => _33XX,1,Dial(SIP/${EXTEN} -;exten => _44XX,1,Dial(SIP/33${EXTEN:2}) +exten => _33XX,1,Dial(SIP/${EXTEN}) +exten => _44XX,1,Dial(SIP/33${EXTEN:2}) |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7915.19410.498 2013-11-18 18:15:30.546470059 +0200 +++ /etc/asterisk/extensions.conf 2013-11-18 18:15:53.422469752 +0200 @@ -1,7 +1,7 @@ [default] exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) -exten => 3301,1,Dial(SIP/3301) -exten => 3302,1,Dial(SIP/3302) -exten => _33XX,1,Dial(SIP/${EXTEN}) -exten => _44XX,1,Dial(SIP/33${EXTEN:2}) +exten => 1101,1,Dial(SIP/1101) +exten => 1102,1,Dial(SIP/1102) +exten => _11XX,1,Dial(SIP/${EXTEN}) +exten => _22XX,1,Dial(SIP/11${EXTEN:2}) |
#shutdown -r
Usage: shutdown [-akrhPHfFnc] [-t sec] time [warning message] -a: use /etc/shutdown.allow -k: don't really shutdown, only warn. -r: reboot after shutdown. -h: halt after shutdown. -P: halt action is to turn off power. -H: halt action is to just halt. -f: do a 'fast' reboot (skip fsck). -F: Force fsck on reboot. -n: do not go through "init" but go down real fast. -c: cancel a running shutdown. -t secs: delay between warning and kill signal. ** the "time" argument is mandatory! (try "now") ** |
#shutdown
Usage: shutdown [-akrhPHfFnc] [-t sec] time [warning message] -a: use /etc/shutdown.allow -k: don't really shutdown, only warn. -r: reboot after shutdown. -h: halt after shutdown. -P: halt action is to turn off power. -H: halt action is to just halt. -f: do a 'fast' reboot (skip fsck). -F: Force fsck on reboot. -n: do not go through "init" but go down real fast. -c: cancel a running shutdown. -t secs: delay between warning and kill signal. ** the "time" argument is mandatory! (try "now") ** |
#shutdown now
|
#[default]
|
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-29432.23787.30802 2013-11-19 10:57:52.793664299 +0200 +++ /etc/asterisk/sip.conf 2013-11-19 10:58:26.277663853 +0200 @@ -12,21 +12,21 @@ type=friend secret=1234 host=dynamic -username=quebec +username=kiev canreinvite=no [donetsk] type=friend secret=1234 host=dynamic -username=quebec +username=kiev canreinvite=no [london] type=friend secret=1234 host=dynamic -username=quebec +username=kiev canreinvite=no [1101] |
#[donetsk]
|
#nano /etc/asterisk/extensions.conf
|
#[default]
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-29432.27281.31562 2013-11-19 11:19:20.753647044 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 11:19:42.189646755 +0200 @@ -13,3 +13,4 @@ ;exten => _2XXX,1,Dial(SIP/${EXTEN}) exten => _2XXX,1,Dial(SIP/london/${EXTEN}) +exten => _3XXX,1,Dial(SIP/ottawa/${EXTEN}) |
#[default]
|
#nano /etc/asterisk/sip.conf
|
#nano /etc/asterisk/extensions.conf
|
#/var/
backups/ cache/ games/ lib/ local/ lock/ log/ mail/ opt/ run/ spool/ tmp/ |
#/var/tmp/asterisk/records/
l3script: /var/tmp/asterisk/records/: Is a directory |
#mkdir /var/tmp/asterisk/records/
mkdir: cannot create directory `/var/tmp/asterisk/records/': File exists |
#ls
record00.gsm |
#rm record00.gsm
|
#ls
record00.gsm |
#rm record00.gsm
|
#ls
|
#rasterisk
Asterisk 1.8.13.1~dfsg-3+deb7u1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux1 (pid = 28179) Verbosity is at least 3 Core debug is at least 3 == Using SIP RTP CoS mark 5 -- Executing [8000@default:1] Answer("SIP/1101-00000040", "") in new stack -- Executing [8000@default:2] Record("SIP/1101-00000040", "/var/tmp/asterisk/records/record00:gsm") in new stack -- <SIP/1101-00000040> Playing 'beep.gsm' (language 'en') -- Executing [8000@default:3] Playback("SIP/1101-00000040", "/var/tmp/asterisk/records/record00") in new stack [Nov 19 14:26:13] WARNING[31034]: file.c:483 ast_filehelper: File /var/tmp/asterisk/records/record00.gsm detected to have zero size. -- Auto fallthrough, channel 'SIP/1101-00000040' status is 'UNKNOWN' linux1*CLI> Disconnected from Asterisk server |
#rasterisk -vvvvvvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux1 (pid = 28179) ... == Using SIP RTP CoS mark 5 -- Executing [8000@default:1] Answer("SIP/1101-00000041", "") in new stack -- Executing [8000@default:2] Record("SIP/1101-00000041", "/var/tmp/asterisk/records/record00:gsm") in new stack -- <SIP/1101-00000041> Playing 'beep.gsm' (language 'en') -- Executing [8000@default:3] Playback("SIP/1101-00000041", "/var/tmp/asterisk/records/record00") in new stack [Nov 19 14:26:44] WARNING[31046]: file.c:483 ast_filehelper: File /var/tmp/asterisk/records/record00.gsm detected to have zero size. -- Auto fallthrough, channel 'SIP/1101-00000041' status is 'UNKNOWN' linux1*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#ls -l
total 0 -rw-rw---- 1 asterisk asterisk 0 Nov 19 14:26 record00.gsm |
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-29432.4525.10782 2013-11-19 14:42:28.377483758 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 14:52:03.153476062 +0200 @@ -12,6 +12,9 @@ ;exten => _2XXX,1,Dial(SIP/${EXTEN}) exten => _2XXX,1,Dial(SIP/london/${EXTEN}) +exten => _2XXX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) +exten => _2XXX,n,Monitor(wav,${MON_FILE},m) +;exten => _2XXX,1,Monitor(wav,123,m) exten => _3XXX,1,Dial(SIP/ottawa/${EXTEN}) |
#play /var/spool/asterisk/m
meetme/ monitor/ |
#play /var/spool/asterisk/monitor/
No protocol specified xcb_connection_has_error() returned true ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave play FAIL sox: Sorry, there is no default audio device configured |
#play /var/spool/asterisk/monitor/
No protocol specified xcb_connection_has_error() returned true play WARN alsa: can't encode 0-bit Unknown or not applicable play FAIL formats: can't determine type of file `/var/spool/asterisk/monitor/' |
Время первой команды журнала | 13:20:17 2013-11-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:53:09 2013-11-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008