Milestone 7 Automation to capture values

Cannot run top command in parallel with file transfer process to capture values.Need some help.

I face same problem.Each and every time i get 0% cpu usage while capture it.I tried sleep command also but always i get 0 as cpu utilization. Please anyone help!!!1

1 Like

Read about threads, subshells and background processes. These may help you.

I did.Cannot background the ftp process and run top or vice versa

Why not? That’s what background processes are for. What difficulty are you facing?

I cant run the top command in background after giving my ftp login credentials automatically.

I call other script in background for data transfer and at same time using top command i fetch cpu utilization but i always get 0.

did you mean we have to constantly fetch value from top command ??

Timing is important when you are fetching the values. Keep that in mind when you are using background processes, because you might be looking at CPU usage when no files are being transferred. Also be 100% sure that you are fetching values from the correct process.

Its giving an error top: failed tty get when I background the process top and run ftp

Maybe the way that you are using top is wrong.

Yes i am sure that i am fetch correct process but i think my timing was wrong.I tried lots of thing but not getting correct answer.

please give some direction for correct timing.

Once the ftp starts how do I start the top process?

Here are some overall steps that you can follow if you like :

  1. Start QBox server
  2. Use FTP and start transferring files
  3. Get your values using htop, top, ps or any other preferred method while files are being transferred.

All you need to figure out is how to run processes in the background and figure out the timing to get the required values while files are being transferred. This will take some figuring out.

I am not getting how to provide different version of the server as an argument when comparing the performance with the benchmark. Also in each script do we have to enter the benchmark values or the entire benchmark file.

The entire file and the version

checkout this

Hey @Patralekha, Probably you have written interactive mode top command in the script. Therefore resulting in failed tty error.

Solution: Try to convert command into batch mode.
Hint: top -b …