/l3/users/makswell/nt-voip/unix7.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#ping 192.168.15.254
![]() connect: Network is unreachable |
#ping 192.168.60.1
![]() connect: Network is unreachable |
#ifdown eth 0
ifdown: interface eth not configured ifdown: interface 0 not configured |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:30:42:78 inet addr:192.168.70.1 Bcast:192.168.70.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe30:4278/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:81 errors:0 dropped:0 overruns:0 frame:0 TX packets:33 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:5550 (5.4 KiB) TX bytes:6080 (5.9 KiB) 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:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1136 (1.1 KiB) TX bytes:1136 (1.1 KiB) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.70.0 * 255.255.255.0 U 0 0 0 eth0 |
#ping 192.168.15.253
![]() connect: Network is unreachable |
#ne
![]() neotoppm netkit-ftp network-admin newgrp neqn net-snmp-config nevow-xmlgettext newusers netcat netstat newaliases |
#init.d
![]() bash: init.d: команда не найдена |
#ps -aux
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.3 0.0 2084 704 ? Ss 09:41 0:01 init [2] root 2 0.0 0.0 0 0 ? S 09:41 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 09:41 0:00 [ksoftirqd/0] root 4 56.2 0.0 0 0 ? R 09:41 4:26 [kworker/0:0] root 6 0.0 0.0 0 0 ? S 09:41 0:00 [migration/0] root 7 0.0 0.0 0 0 ? S 09:41 0:00 [watchdog/0] root 8 0.0 0.0 0 0 ? S 09:41 0:00 [migration/1] root 10 0.0 0.0 0 0 ? S 09:41 0:00 [ksoftirqd/1] ... user 1972 0.1 0.0 83040 12324 ? Sl 09:44 0:00 gnome-terminal user 1973 0.0 0.0 1952 692 ? S 09:44 0:00 gnome-pty-helpe user 1974 0.0 0.0 6268 3464 pts/0 Ss 09:44 0:00 bash root 1990 0.0 0.0 4476 1408 pts/0 S+ 09:44 0:00 su root root 1999 0.0 0.0 3444 748 pts/0 S+ 09:44 0:00 script -f -c ba root 2030 0.0 0.0 3448 424 pts/0 S+ 09:44 0:00 script -f -c ba root 2031 0.0 0.0 4648 1944 pts/1 Ss 09:44 0:00 bash user 2070 0.0 0.0 6268 3552 pts/2 Ss+ 09:45 0:00 bash root 2086 0.0 0.0 0 0 ? S 09:45 0:00 [kworker/2:2] root 2170 0.0 0.0 3924 1072 pts/1 R+ 09:49 0:00 ps -aux |
#/etc/init.d/n
![]() networking network-manager nfs-common |
#/etc/init.d/network-manager stop
Stopping network connection manager: NetworkManager. |
#ls /etc/rc
![]() rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rc.local rcS.d/ |
#ls /etc/rc2.d/*network-manager
/etc/rc2.d/S19network-manager |
#ifup eth0
SIOCADDRT: No such process Failed to bring up eth0. |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifup eth0
SIOCADDRT: No such process Failed to bring up eth0. |
#dm
![]() dmesg dmidecode dmsetup |
#dm
![]() dmesg dmidecode dmsetup |
#dmes
![]() bash: dmes: команда не найдена |
#dmesg
[ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.39-bpo.2-686-pae (Debian 2.6.39-3~bpo60+1) (norbert@tretkowski.de) (gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Thu Aug 4 11:02:22 UTC 2011 [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 0000000000092800 (usable) [ 0.000000] BIOS-e820: 0000000000092800 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 0000000020000000 (usable) [ 0.000000] BIOS-e820: 0000000020000000 - 0000000020200000 (reserved) [ 0.000000] BIOS-e820: 0000000020200000 - 0000000040000000 (usable) ... [ 13.286350] Bluetooth: HCI socket layer initialized [ 13.286351] Bluetooth: L2CAP socket layer initialized [ 13.286620] Bluetooth: SCO socket layer initialized [ 13.300199] Bluetooth: RFCOMM TTY layer initialized [ 13.300209] Bluetooth: RFCOMM socket layer initialized [ 13.300211] Bluetooth: RFCOMM ver 1.11 [ 13.377599] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 13.377600] Bluetooth: BNEP filters: protocol multicast [ 13.431525] Bridge firewalling registered [ 19.342339] eth0: no IPv6 routers present |
#tail -n 10 /
![]() bin/ etc/ lib/ mnt/ root/ srv/ usr/ boot/ home/ lost+found/ opt/ sbin/ sys/ var/ dev/ initrd.img media/ proc/ selinux/ tmp/ vmlinuz |
#tail -n 10 /var/lo
![]() local/ lock/ log/ |
#tail -n 10 /var/lo
![]() local/ lock/ log/ |
#tail -n 10 /var/log/
![]() alternatives.log dmesg installer/ pm-powersave.log apt/ dmesg.0 kern.log pycentral.log aptitude dmesg.1.gz lastlog syslog asterisk/ dmesg.2.gz lpr.log syslog.1 auth.log dpkg.log mail.err unattended-upgrades/ boot exim4/ mail.info user.log btmp faillog mail.log wtmp ConsoleKit/ fontconfig.log mail.warn Xorg.0.log daemon.log fsck/ messages Xorg.0.log.old debug gdm3/ news/ |
#tail -n 10 /var/log/
![]() alternatives.log dmesg installer/ pm-powersave.log apt/ dmesg.0 kern.log pycentral.log aptitude dmesg.1.gz lastlog syslog asterisk/ dmesg.2.gz lpr.log syslog.1 auth.log dpkg.log mail.err unattended-upgrades/ boot exim4/ mail.info user.log btmp faillog mail.log wtmp ConsoleKit/ fontconfig.log mail.warn Xorg.0.log daemon.log fsck/ messages Xorg.0.log.old debug gdm3/ news/ |
#tail -n 10 /var/log/d
![]() daemon.log debug dmesg dmesg.0 dmesg.1.gz dmesg.2.gz dpkg.log |
#tail -n 10 /var/log/daemon.log
Oct 23 09:41:44 unix7 gdm-simple-greeter[1755]: Gtk-WARNING: /build/buildd-gtk+2.0_2.20.1-2-i386-TNeM25/gtk+2.0-2.20.1/gtk/gtkwidget.c:5628: widget not within a GtkWindow Oct 23 09:41:48 unix7 modem-manager: (ttyS1) closing serial device... Oct 23 09:41:48 unix7 modem-manager: (ttyS1) opening serial device... Oct 23 09:41:55 unix7 modem-manager: (ttyS1) closing serial device... Oct 23 09:42:16 unix7 gdm-simple-greeter[1755]: WARNING: Failed to send buffer Oct 23 09:42:25 unix7 AptDaemon: INFO: Initializing daemon Oct 23 09:47:26 unix7 AptDaemon: INFO: Quiting due to inactivity Oct 23 09:47:26 unix7 AptDaemon: INFO: Shutdown was requested Oct 23 09:49:54 unix7 NetworkManager[1478]: <info> caught signal 15, shutting down normally. Oct 23 09:49:54 unix7 NetworkManager[1478]: <info> exiting (success) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.70.0 * 255.255.255.0 U 0 0 0 eth0 |
#add route
![]() .bash_history .gnome2/ .nautilus/ Загрузки/ .bash_logout .gnupg/ .profile Изображения/ .bash_profile .gstreamer-0.10/ .recently-used.xbel Музыка/ .bashrc .gtk-bookmarks .ssh/ Общедоступные/ .config/ .gvfs/ .update-notifier/ Рабочий стол/ .dbus/ .ICEauthority .xsession-errors Шаблоны/ .fontconfig/ .l3rc .xsession-errors.old .gconf/ .lilalo/ Видео/ .gconfd/ .local/ Документы/ |
#add route
![]() .bash_history .gnome2/ .nautilus/ Загрузки/ .bash_logout .gnupg/ .profile Изображения/ .bash_profile .gstreamer-0.10/ .recently-used.xbel Музыка/ .bashrc .gtk-bookmarks .ssh/ Общедоступные/ .config/ .gvfs/ .update-notifier/ Рабочий стол/ .dbus/ .ICEauthority .xsession-errors Шаблоны/ .fontconfig/ .l3rc .xsession-errors.old .gconf/ .lilalo/ Видео/ .gconfd/ .local/ Документы/ |
#add route 0.0.0.0 gw 192.168.15.254
bash: add: команда не найдена |
#route
![]() .bash_history .gnome2/ .nautilus/ Загрузки/ .bash_logout .gnupg/ .profile Изображения/ .bash_profile .gstreamer-0.10/ .recently-used.xbel Музыка/ .bashrc .gtk-bookmarks .ssh/ Общедоступные/ .config/ .gvfs/ .update-notifier/ Рабочий стол/ .dbus/ .ICEauthority .xsession-errors Шаблоны/ .fontconfig/ .l3rc .xsession-errors.old .gconf/ .lilalo/ Видео/ .gconfd/ .local/ Документы/ |
#route
![]() .bash_history .gnome2/ .nautilus/ Загрузки/ .bash_logout .gnupg/ .profile Изображения/ .bash_profile .gstreamer-0.10/ .recently-used.xbel Музыка/ .bashrc .gtk-bookmarks .ssh/ Общедоступные/ .config/ .gvfs/ .update-notifier/ Рабочий стол/ .dbus/ .ICEauthority .xsession-errors Шаблоны/ .fontconfig/ .l3rc .xsession-errors.old .gconf/ .lilalo/ Видео/ .gconfd/ .local/ Документы/ |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.70.0 * 255.255.255.0 U 0 0 0 eth0 |
#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 -r now
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.70.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
#cat /etc/n
![]() nanorc network/ networks nsswitch.conf |
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.70.1 netmask 255.255.255.0 network 192.168.70.0 broadcast 192.168.70.255 gateway 192.168.15.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.70.254 dns-search unix.nt |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.70.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifup eth0
|
#ping 192.168.60.1
PING 192.168.60.1 (192.168.60.1) 56(84) bytes of data. 64 bytes from 192.168.60.1: icmp_req=1 ttl=63 time=0.725 ms ^C --- 192.168.60.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.725/0.725/0.725/0.000 ms |
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. 64 bytes from 192.168.15.254: icmp_req=1 ttl=63 time=0.480 ms 64 bytes from 192.168.15.254: icmp_req=2 ttl=63 time=0.447 ms ^C --- 192.168.15.254 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.447/0.463/0.480/0.027 ms |
#./etc/bash-completion
![]() bash: ./etc/bash-completion: Нет такого файла или каталога |
#apt-get install isc-dhcp-server
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Предлагаемые пакеты: isc-dhcp-server-ldap НОВЫЕ пакеты, которые будут установлены: isc-dhcp-server обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 378 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 889 kB. ... Предварительная настройка пакетов ... Выбор ранее не выбранного пакета isc-dhcp-server. (Чтение базы данных ... на данный момент установлено 116066 файлов и каталогов.) Распаковывается пакет isc-dhcp-server (из файла .../isc-dhcp-server_4.1.1-P1-15+squeeze8_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет isc-dhcp-server (4.1.1-P1-15+squeeze8) ... Generating /etc/default/isc-dhcp-server... Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed! failed! invoke-rc.d: initscript isc-dhcp-server, action "start" failed. |
#apt-get install isc-dhcp-server
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Уже установлена самая новая версия isc-dhcp-server. обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. |
#nano /etc/dhcp/dhc
![]() |
#nano /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-2037.23683.8098 2012-10-23 10:07:36.609640119 +0300 +++ /etc/dhcp/dhcpd.conf 2012-10-23 10:15:26.837640321 +0300 @@ -10,8 +10,8 @@ ddns-update-style none; # option definitions common to all supported networks... -option domain-name "example.org"; -option domain-name-servers ns1.example.org, ns2.example.org; +option domain-name "unix.nt"; +option domain-name-servers 192.168.15.254; default-lease-time 600; max-lease-time 7200; @@ -27,8 +27,9 @@ # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. -#subnet 10.152.187.0 netmask 255.255.255.0 { -#} +subnet 192.168.70.0 netmask 255.255.255.0 { +range 192.168.70.100 192.168.70.120; +} # This is a very basic subnet declaration. |
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd. Starting ISC DHCP server: dhcpd. |
#less /var/lib/dhcp/dhc
![]() |
#less /var/lib/dhcp/dhcpd.leases
|
#tail -f /var/lib/dhcp/dhc
![]() dhclient.leases dhcpd.leases dhcpd.leases~ |
#tail -f /var/lib/dhcp/dhc
![]() dhclient.leases dhcpd.leases dhcpd.leases~ |
#tail -f /var/lib/dhcp/dhcpd.leases
![]() lease 192.168.70.100 { starts 2 2012/10/23 07:35:22; ends 2 2012/10/23 07:45:22; cltt 2 2012/10/23 07:35:22; binding state active; next binding state free; hardware ethernet 18:a9:05:d1:28:a7; uid "\001\030\251\005\321(\247"; client-hostname "maks"; } ... starts 2 2012/10/23 07:40:21; ends 2 2012/10/23 07:50:21; cltt 2 2012/10/23 07:40:21; binding state active; next binding state free; hardware ethernet 18:a9:05:d1:28:a7; uid "\001\030\251\005\321(\247"; client-hostname "maks"; } ^C |
#ping 192.168.70.101
PING 192.168.70.101 (192.168.70.101) 56(84) bytes of data. 64 bytes from 192.168.70.101: icmp_req=1 ttl=250 time=68.8 ms 64 bytes from 192.168.70.101: icmp_req=2 ttl=250 time=67.4 ms ^C --- 192.168.70.101 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 67.402/68.130/68.859/0.773 ms |
#ping 192.168.70.100
![]() PING 192.168.70.100 (192.168.70.100) 56(84) bytes of data. ^C --- 192.168.70.100 ping statistics --- 7 packets transmitted, 0 received, 100% packet loss, time 6046ms |
#cat /etc/asterisk/sip.conf
[general] context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) tcpenable=no ; Enable server for incoming TCP connections (default is no) tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) srvlookup=yes ; Enable DNS SRV lookups on outbound calls [2201] type=friend secret=1234 host=dynamic |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) Verbosity was 0 and is now 3 -- Registered SIP '2201' at 192.168.70.100 port 5060 [Oct 23 11:11:26] NOTICE[1636]: chan_sip.c:21638 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2201 == Using SIP RTP CoS mark 5 [Oct 23 11:50:43] NOTICE[1636]: chan_sip.c:20320 handle_request_invite: Call from '2201' to extension '8000' rejected because extension not found in context 'default'. unix7*CLI> exit Executing last minute cleanups |
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.BACKUP
|
#nano /etc/asterisk//ext
![]() --- /dev/null 2012-10-23 09:59:10.890595505 +0300 +++ /etc/asterisk//extensions.conf 2012-10-23 12:04:47.045643127 +0300 @@ -0,0 +1,3 @@ +[default] + +exten =>8000,1,Playback(welcome) |
#nano /etc/asterisk//extensions.conf
![]() --- /tmp/l3-saved-2037.20899.15111 2012-10-23 12:14:52.821643385 +0300 +++ /etc/asterisk/sip.conf 2012-10-23 12:15:25.813643399 +0300 @@ -11,3 +11,9 @@ secret=1234 host=dynamic +[2202] +type=friend +secret=1234 +host=dynamic + + |
#[default]
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) Verbosity is at least 3 unix7*CLI> dialplan reload ... -- Added extension 's' priority 1 to app_dial_gosub_virtual_context (0xb52e0f10) -- Time to scan old dialplan and merge leftovers back into the new: 0.000290 sec -- Time to restore hints and swap in new dialplan: 0.000000 sec -- Time to delete the old dialplan: 0.000040 sec -- Total time merge_contexts_delete: 0.000330 sec unix7*CLI> asterisk -rv No such command 'asterisk -rv' (type 'core show help asterisk -rv' for other possible commands) unix7*CLI> asterisk -rvv No such command 'asterisk -rvv' (type 'core show help asterisk -rvv' for other possible commands) unix7*CLI> exit |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) ... unix7*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 2201/2201 192.168.70.101 D N 5060 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline] == Using SIP RTP CoS mark 5 -- Executing [8000@default:1] Playback("SIP/2201-00000002", "welcome") in new stack -- <SIP/2201-00000002> Playing 'welcome.gsm' (language 'en') -- Auto fallthrough, channel 'SIP/2201-00000002' status is 'UNKNOWN' unix7*CLI> exit Executing last minute cleanups |
#e
![]() e2freefrag eval e2fsck evince e2image evince-previewer e2label evince-thumbnailer e2undo evolution echo evolution-settings edit ex editor exchange-connector-setup-2.30 editres exec egrep exicyclog ... envsubst exiqsumm eog exit epiphany exiv2 epiphany-browser exiwhat eps2eps expand epsilon-benchmark expiry eqn export esac expr espeak eyuvtoppm espeak-synthesis-driver |
#nano /etc/asterisk/sip.conf
|
#[general]
|
#[general]
![]() astcanary astman astribank_is_starting asterisk astribank_allow astribank_tool astgenkey astribank_hexload |
#ast
![]() astcanary astman astribank_is_starting asterisk astribank_allow astribank_tool astgenkey astribank_hexload |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) Verbosity is at least 3 unix7*CLI> sip reload ... [Oct 23 12:17:43] NOTICE[1636]: chan_sip.c:21638 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Oct 23 12:17:43] NOTICE[1636]: chan_sip.c:21638 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 unix7*CLI> sip show pee peers peer unix7*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 2201/2201 192.168.70.101 D N 5060 Unmonitored 2202/2202 192.168.70.100 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] unix7*CLI> exit |
#/
![]() bin/ etc/ lost+found/ opt/ sbin/ sys/ var/ boot/ home/ media/ proc/ selinux/ tmp/ dev/ lib/ mnt/ root/ srv/ usr/ |
#nano /etc/e
![]() |
#nano /etc/e
![]() --- /tmp/l3-saved-2037.8673.16710 2012-10-23 12:19:22.965643501 +0300 +++ /etc/asterisk//extensions.conf 2012-10-23 12:20:14.893643523 +0300 @@ -1,3 +1,5 @@ [default] exten =>8000,1,Playback(welcome) + +exten => 2201,1,Dial(SIP/2201) |
#nano /etc/asterisk/extensions
|
#[default]
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) Verbosity is at least 3 unix7*CLI> sip reload Reloading SIP == Using SIP RTP CoS mark 5 [Oct 23 12:20:42] NOTICE[1636]: chan_sip.c:20320 handle_request_invite: Call from '2202' to extension '2201' rejected because extension not found in context 'default'. unix7*CLI> exit |
#nano /etc/asterisk//extensions.conf
--- /tmp/l3-saved-2037.4470.24814 2012-10-23 12:28:23.405643731 +0300 +++ /etc/asterisk//extensions.conf 2012-10-23 12:29:27.521643759 +0300 @@ -2,4 +2,4 @@ exten =>8000,1,Playback(welcome) -exten => 2201,1,Dial(SIP/2201) +exten => _22XX,1,Dial(SIP/${EXTEN}) |
#[default]
![]() as aspell-autobuildhash astman asciitopgm aspell-import astribank_allow aseqdump astcanary astribank_hexload aseqnet asterisk astribank_is_starting aspell astgenkey astribank_tool |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) Verbosity is at least 3 unix7*CLI> dialplan reload ... == Using SIP RTP CoS mark 5 -- Executing [2201@default:1] Dial("SIP/2202-00000003", "SIP/2201") in new stack == Using SIP RTP CoS mark 5 -- Called 2201 -- SIP/2201-00000004 is ringing -- SIP/2201-00000004 answered SIP/2202-00000003 -- Native bridging SIP/2202-00000003 and SIP/2201-00000004 -- Got SIP response 500 "Server Internal Error" back from 192.168.70.100 == Spawn extension (default, 2201, 1) exited non-zero on 'SIP/2202-00000003' unix7*CLI> exit |
#nano /etc/asterisk//extensions.conf
|
#[default]
GNU nano 2.2.4 Файл: /etc/asterisk//extensions.conf Ðзменен [default] exten =>8000,1,Playback(welcome) exten => _22XX,1,Dial(SIP/${EXTEN}) [ ÐÑоÑиÑано 5 ÑÑÑок ] ^G ÐомоÑÑ^O ÐапиÑаÑÑ ^R ЧиÑФайл ^Y ÐÑедCÑÑ ^K ÐÑÑезаÑÑ ^C ТекÐÐ¾Ð·Ð¸Ñ ^X ÐÑÑ Ð¾Ð´ ^J ÐÑÑовнÑÑÑ ^W ÐÐ^V СледCÑÑ ^U ÐÑмÐÑÑезк ^T СловаÑÑ |
#nano /etc/asterisk//extensions.conf
|
#[default]
![]() bash: sip: команда не найдена |
#as
![]() as aspell-autobuildhash astman asciitopgm aspell-import astribank_allow aseqdump astcanary astribank_hexload aseqnet asterisk astribank_is_starting aspell astgenkey astribank_tool |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) Verbosity is at least 3 unix7*CLI> exit |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) ... == Using SIP RTP CoS mark 5 -- Executing [2202@default:1] Dial("SIP/2201-00000011", "SIP/2202") in new stack == Using SIP RTP CoS mark 5 -- Called 2202 -- SIP/2202-00000012 is ringing -- SIP/2202-00000012 answered SIP/2201-00000011 -- Native bridging SIP/2201-00000011 and SIP/2202-00000012 == Spawn extension (default, 2202, 1) exited non-zero on 'SIP/2201-00000011' unix7*CLI> exit Executing last minute cleanups |
#nano /etc/asterisk//extensions.conf
--- /tmp/l3-saved-2037.2524.29972 2012-10-23 13:53:50.857645925 +0300 +++ /etc/asterisk//extensions.conf 2012-10-23 13:59:58.797646083 +0300 @@ -3,3 +3,12 @@ exten =>8000,1,Playback(welcome) exten => _22XX,1,Dial(SIP/${EXTEN}) + +exten => _81XX,1,Record(/var/tmp/asterisk/message$(EXTEN:2):gsm,1) +exten => _81XX,n,Playback(/var/tmp/asterisk/message$(EXTEN:2):gsm) + +exten => _82XX,1,Playback(/var/tmp/asterisk/message$(EXTEN:2):gsm) + + + + |
#mkdir /var/tmp/asterisk
|
#chown asterisk:asterisk /var/tmp/asterisk/
|
#[default]
|
#nano /etc/asterisk/extensions.conf
|
#[default]
message04.gsm message05.gsm message06.gsm |
#[default]
|
#[general]
![]() astcanary astman astribank_is_starting asterisk astribank_allow astribank_tool astgenkey astribank_hexload |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) ... 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 1 offline] -- Registered SIP 'manchester' at 192.168.60.1 port 5060 unix7*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 2201/2201 192.168.70.101 D N 5060 Unmonitored 2202/2202 192.168.70.100 D N 5060 Unmonitored manchester/london 192.168.60.1 D N 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] unix7*CLI> exit Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2037.23484.21128 2012-10-23 14:38:50.825647079 +0300 +++ /etc/asterisk/extensions.conf 2012-10-23 14:41:32.745647149 +0300 @@ -9,6 +9,6 @@ exten => _82XX,1,Playback(/var/tmp/asterisk/message${EXTEN:2:}) - +exten => _21XX,1,Dial(SIP/manchester/${EXTEN}) |
#[default]
Asterisk 1.6.2.9-2+squeeze8, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze8 currently running on unix7 (pid = 1565) ... -- SIP/2201-00000027 is ringing == Spawn extension (default, 2201, 1) exited non-zero on 'SIP/manchester-00000026' == Using SIP RTP CoS mark 5 -- Executing [2101@default:1] Dial("SIP/2202-00000028", "SIP/manchester/2101") in new stack == Using SIP RTP CoS mark 5 -- Called manchester/2101 -- SIP/manchester-00000029 is ringing == Spawn extension (default, 2101, 1) exited non-zero on 'SIP/2202-00000028' unix7*CLI> exit Executing last minute cleanups |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-2037.3582.15006 2012-10-23 15:00:03.229647623 +0300 +++ /etc/asterisk/sip.conf 2012-10-23 15:05:54.309647775 +0300 @@ -7,6 +7,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls register => london:london@192.168.60.1/manchester +register => london:london@192.168.40.1/poltava [2201] type=friend @@ -27,3 +28,13 @@ secret=london canreinvite=no qualify=yes + +[poltava] +type=friend +host=dynamic +username=london +secret=london +canreinvite=no +qualify=yes + + |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-2037.30706.28147 2012-10-23 15:06:14.133647783 +0300 +++ /etc/asterisk/sip.conf 2012-10-23 15:06:33.193647791 +0300 @@ -7,7 +7,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls register => london:london@192.168.60.1/manchester -register => london:london@192.168.40.1/poltava +register => london:1234@192.168.40.1/poltava [2201] type=friend |
[general] context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) tcpenable=no ; Enable server for incoming TCP connections (default is no) tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) srvlookup=yes ; Enable DNS SRV lookups on outbound calls [2201] type=friend secret=1234 host=dynamic
nanorc network/ networks nsswitch.conf
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.70.1 netmask 255.255.255.0 network 192.168.70.0 broadcast 192.168.70.255 gateway 192.168.15.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.70.254 dns-search unix.nt
Время первой команды журнала | 08:45:13 2012-10-23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:06:12 2012-10-23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 9.90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.54 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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