login about faq


I have a problem when running mpstat command with update parameter and awk command (Linux 2.6).

When I sent command mpstat, I receive data. With awk (mpstat | awk '{print $3,$4,$5,$6,$7,$8,$9,$10,$11}'), I receive data too.

Now, I add update parameter: I receive data with mpstat alone: mpstat 10. But with awk, I never receive data, I have no error : mpstat 10 | awk '{print $3,$4,$5,$6,$7,$8,$9,$10,$11}'

int channel = ssh->OpenSessionChannel();

if( !ssh->SendReqExec(channel, "mpstat 10")


do {

if( ssh->ChannelPoll(channel, 1000) <= 0 ) continue; // with awk, always timeout

String ^ res = ssh->GetReceivedText(channel, "ansi");

if( res != nullptr ) System::Console::WriteLine(res);

} while(true);

I don't understand what it is happen. Have you any idea ?

Thanks for your answers.

asked Mar 14 '13 at 09:23

Tof's gravatar image


edited Mar 15 '13 at 04:57

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 14 '13 at 09:23

Seen: 1,840 times

Last updated: Mar 15 '13 at 04:57

powered by OSQA