Запускаем интерактивное ПО в оболочке и выполняем там какие-либо действия:
script -q -a /var/log/mylog -c 'telnet ya.ru 80'
Trying 87.250.251.3...
Connected to ya.ru.
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 26 Dec 2011 16:31:18 GMT
Content-Type: text/html; charset=windows-1251
Content-Length: 166
Connection: close
400 Bad Request
400 Bad Request
nginx
Connection closed by foreign host.
root@ovzgate:~#
Просмтриваем лог программы, в котором отразились все действия:
cat /var/log/mylog
Script started on Mon Dec 26 19:31:08 2011
Trying 87.250.251.3...
Connected to ya.ru.
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 26 Dec 2011 16:31:18 GMT
Content-Type: text/html; charset=windows-1251
Content-Length: 166
Connection: close
400 Bad Request
400 Bad Request
nginx
Connection closed by foreign host.
No comments :
Post a Comment
Note: only a member of this blog may post a comment.