Sponsored Content
Top Forums Shell Programming and Scripting Expect doesn't output the logs Post 302876144 by yanglei_fage on Friday 22nd of November 2013 02:19:47 AM
Old 11-22-2013
Expect doesn't output the logs

Code:
(qemu) migrate -d tcp:192.168.122.1:4444
(qemu) info migrate 
capabilities: xbzrle: off 
Migration status: completed
total time: 4425 milliseconds
downtime: 3 milliseconds
transferred ram: 130338 kbytes
remaining ram: 0 kbytes
total ram: 1057152 kbytes
duplicate: 232613 pages
normal: 32011 pages
normal bytes: 128044 kbytes
(qemu)

I use below expect scripts fragment
Code:
puts "run cmd migrate -d tcp:192.168.122.1:4444"

expect {
        "*qemu*" {send "migrate -d tcp:192.168.122.1:4444\r\n" }
        timeout {  exit 2 }
}
sleep 10
puts "run info migrate"
expect {
    "(qemu)" {send "\ninfo migrate\r\n"}
#        timeout {  exit 2 }
}
puts "migrate is over"

I can't get the below output log with expect scripts, which print from the cmd "info migrate"

capabilities: xbzrle: off
Migration status: completed
total time: 4425 milliseconds
downtime: 3 milliseconds
transferred ram: 130338 kbytes
remaining ram: 0 kbytes
total ram: 1057152 kbytes
duplicate: 232613 pages
normal: 32011 pages
normal bytes: 128044 kbytes

Last edited by yanglei_fage; 11-22-2013 at 04:05 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect - Interact output hangs when large output

Hello, I have a simple expect script I use to ssh to a workstation. I then pass control over to the user with interact. This script works fine on my HP and Mac, but on my Linux Desktop, I get a problem where the terminal hangs when ever I execute a command in the interact session that requires a... (0 Replies)
Discussion started by: natedog
0 Replies

2. Shell Programming and Scripting

Expect script doesn't work under crontab

Hi All, Using Expect script when I run it manually it works. But when I put the entry in crontab, the job is still running after 15 hours. The script was created as root. I don't think it's a permission issue. Any idea? This is what I have under root crontab... 00 18 * * 1-5... (4 Replies)
Discussion started by: samnyc
4 Replies

3. Shell Programming and Scripting

background functions doesn't display their output

hello there, there's a function, in my shell script, i'd like to run in the background. here's an example: log() { local SELF=${0##*/} tty -s && echo ": $*" } some_func() { # do something log "This text is not displayed in the terminal's output when running in the... (1 Reply)
Discussion started by: Shedon
1 Replies

4. Shell Programming and Scripting

Output from Logs

Hello All, I have created a script to capture logs on every day at every 3 Min.Please find in attach.So my goal is to mail all the logs to myself for pertical date.So can anyone guide me how can i this on the basis of the attached logs. Regards Ankit (0 Replies)
Discussion started by: ajaincv
0 Replies

5. Shell Programming and Scripting

Expect doesn't recognize a password prompt

Hi. Here is beginning of my script #!/usr/local/bin/expect -- set timeout 15 spawn /usr/local/account.sh -n modify expect "Password:" {send "mypassword\r"} But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this: and expect... (3 Replies)
Discussion started by: urello
3 Replies

6. Shell Programming and Scripting

Using expect doesn't preserve the stderr

Hello, I am performing the follwing line from a unix server: expect -c 'spawn ssh otherHost chown -R user:group /usr ; expect password: ; send 123456\n ; interact ;' I am getting return value 0, an empty stderr and a stdout that says "/usr/... Not owner, /usr/... Not Owner ..". If I... (2 Replies)
Discussion started by: lastZenMaster
2 Replies

7. Shell Programming and Scripting

Take the input from output logs

Hi, If I have loads of logs like below and I am interested to print the requests(lines) which have taken more than 1000 ms. In this case how could I print the two highlighted lines ? abc.log reqquest id232342 , adfghfasdfsaf, TIME=30 reqquest id11111 , asdfdfghdffsaf, TIME=54 reqquest... (0 Replies)
Discussion started by: nariwithu
0 Replies

8. Shell Programming and Scripting

Take the input from output logs

Hi, If I have loads of logs like below and I am interested to print the requests(lines) which have taken more than 1000 ms. In this case how could I print the two highlighted lines ? abc.log reqquest id232342 , adfghfasdfsaf, TIME=30 reqquest id11111 , asdfdfghdffsaf, TIME=54 reqquest... (4 Replies)
Discussion started by: nariwithu
4 Replies

9. Shell Programming and Scripting

Pull out information from output logs

My scenario is as follows. 1. I have a reference file with the IP addresses and names $ cat ref.list 10.11.xxx.xxx AA 10.12.xxx.xxx BB 10.13.xxx.xxx CC 10.14.xxx.xxx DD 2. A script runs and gets me one of the IP addresses and puts it in a separate file, for e.g... (2 Replies)
Discussion started by: Nagesh_1985
2 Replies

10. Shell Programming and Scripting

Expect script to collect logs in expert mode

I am trying to collect logs from a system in expert mode. Where I login to system and then change mode to expert mode and issue command to collect the log. I have a script which works but It waits for 30 mins even though log collection is complete before that. I have two issues with existing... (4 Replies)
Discussion started by: shunya
4 Replies
queue-pr(8)                                               GNATS Administration Utilities                                               queue-pr(8)

NAME
queue-pr - incoming mail control for GNATS SYNOPSIS
queue-pr [ -q | --queue ] [ -r | --run ] [ -f filename | --file=filename ] [ -m kbytes | --max-size=kbytes ] [ -d database | --database=database ] [ -h | --help ] [ -V | --version ] DESCRIPTION
`queue-pr -q' should run through a pipe(2V) via the mail aliases(5) mechanism to automatically place incoming bug reports in a queue direc- tory for GNATS. Run `queue-pr -r' via cron(8) to periodically empty the GNATS queue, filing new bug reports in the database. Always use one of -q | --queue or -r | --run (but not both), in each call to queue-pr. These are mutually exclusive functions in order to avoid collisions. OPTIONS
-q, --queue Accept standard input as an incoming mail message, placing this message in an incrementally numbered file in the database subdi- rectory gnats-queue for future handling. -r, --run Redirect files from the database subdirectory gnats-queue to file-pr(8) which files and creates index entries for each. -f filename or --file=filename Treat filename as input rather than reading from standard input (used with the --queue option). -m kbytes, --max-size=kbytes Do not process messages larger than kbytes kilobytes in size. Files larger than the limit are left for human intervention. -d database or --database=databasename Used with the --queue or --run options, use the database named database rather than the database default or the database speci- fied by the GNATSDB environment variable. -h, --help Displays a short usage message. -V, --version Displays the queue-pr version number. ENVIRONMENT VARIABLES
The GNATSDB environment variable is used to determine which database to use. For a local database, it contains the name of the database to access. If GNATSDB is not set, the database named default is used. SEE ALSO
Keeping Track: Managing Messages With GNATS (also installed as the GNU Info file gnats.info) databases(5), dbconfig(5), delete-pr(8), edit-pr(1) file-pr(8), gen-index(8), gnats(7), gnatsd(8), mkcat(8), mkdb(8), pr-edit(8), query- pr(1), queue-pr(8), send-pr(1). COPYING
Copyright (c) 1993, 2003, Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English. GNATS August 2003 queue-pr(8)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy