Giter Club home page Giter Club logo

Comments (12)

honggyukim avatar honggyukim commented on May 20, 2024

Otherwise is there any other way to run it for a specific time duration? for example, I would like to run guider for only 3 seconds using any kind of command.

from guider.

iipeace avatar iipeace commented on May 20, 2024

Hi, @honggyukim,
You can use -i option and -N option.
$ guider top -N 3
$.guider top -N 1 -i 3

from guider.

honggyukim avatar honggyukim commented on May 20, 2024

Thanks but I got the below error:

$ guider top -N 1 -i 3

[Error] wrong option value with -N option, input [REPORT_ALWAYS|REPORT_BOUND]@IP:PORT in format

from guider.

iipeace avatar iipeace commented on May 20, 2024

I am sorry @honggyukim,
I am little bit confused ;(
You can use -R option.
$ guider top -R 3, 1
$ guider top -R 1, 3

from guider.

honggyukim avatar honggyukim commented on May 20, 2024

Thanks @iipeace! It works now. I have one more question. : )
Is it possible to see the result without screen clear?

from guider.

iipeace avatar iipeace commented on May 20, 2024

@honggyukim,
You can use -R option and -o option.
$ guider top -R 1, 3 -o .

and check guider.out file :)

from guider.

honggyukim avatar honggyukim commented on May 20, 2024

Thanks! It would also be really nice for me to print the output on console as well in some ways.

from guider.

iipeace avatar iipeace commented on May 20, 2024

may I ask you the reason why do you wanna get the output without screen clear?

from guider.

honggyukim avatar honggyukim commented on May 20, 2024

To give you an idea, I'm writing uftrace.py for python script so want to target guider program while developing and testing it although I'm just prototyping as of now.
Here is just a snippet of the output as of now. : )

 __________________________
/ g.u.i.d.e.r   ver.3.8.8 /
--------------------------
 401.020 us [77222] |           } /* pipePrint */
 694.036 us [77222] |         } /* printTitle */
   1.532  s [77222] |         guider.py(18482):             SystemManager.pipePrint(SystemManager.bufferString)
            [77222] |         pipePrint() {
  18.835 us [77222] |           guider.py(7613):         if SystemManager.pipeForPrint == None and SystemManager.selectMenu == None and \
  44.823 us [77222] |           guider.py(7614):             SystemManager.printFile == None and SystemManager.isTopMode() is False and \
            [77222] |           isTopMode() {
  18.120 us [77222] |             guider.py(8511):         if sys.argv[1] == 'top':
  41.962 us [77222] |             guider.py(8512):             return True
  66.042 us [77222] |           } /* isTopMode */
 155.926 us [77222] |           guider.py(7624):         if SystemManager.pipeForPrint != None:
 180.960 us [77222] |           guider.py(7633):         if SystemManager.printFile != None and SystemManager.fileForPrint == None:
 205.994 us [77222] |           guider.py(7670):         if SystemManager.fileForPrint != None:
 229.836 us [77222] |           guider.py(7680):             print(line)

[Top Info] [Time: 4952345.020] [Interval: 6.5] [Ctxt: 79384] [Fork: 3] [IRQ: 19007] [Core: 40] [Task: 754/876] [RAM: 64310] [Swap: 65439] [Unit: %/MB/NR]
==========================================================================================================================================================
  ID   | CPU (Usr/Ker/Blk/IRQ)| Mem (Free/Anon/File/Slab)| Swap (Used/ InOut )| Reclaim  | BlkRW | NrFlt | NrBlk | NrSIRQ  | NrMlk | NrDrt  |   NetIO    |
----------------------------------------------------------------------------------------------------------------------------------------------------------
Total  |  7 %( 4 / 2 / 0 / 0 )|1893 (150 /-152/ 0  / 2  )| 3812 ( 0  /  0/0  )|   0/0    |  0/0  |   0   |   0   |  11745  |  915  |   14   |   78K/3M   |
==========================================================================================================================================================
    Process      ( ID  / Pid / Nr / Pri)| CPU(Usr/Ker/Dly)|  Mem(RSS/Txt/Shr/Swp)| Blk( RD / WR /NrFlt)| Yld | Prmt | FD | LifeTime|    SignalHandler    |
----------------------------------------------------------------------------------------------------------------------------------------------------------
 qemu-system-x86 (52786/    1/  18/C  0)|  89( 89/  0/  -)| 14087(7024/  0/  2/1366)|   0(   -/   -/    0)|    -|     -|  64|704:28:29|      180004243      |
              vi (71892/71891/   1/C  0)|  87( 18/ 69/  -)| 18567(18498/  0/  5/  0)|   0(   -/   -/    0)|    -|     -|  64|  1:31:36|      1ef804eff      |
            tmux (41733/    1/   1/C  0)|  31( 29/  2/  -)|  171(145/  0/  2/  0)|   0(   -/   -/    0)|    -|     -| 512|1351:28:47|      188034201      |
          guider (77222/73881/   1/C  0)|  12( 11/  1/  -)|   39( 18/  2/  4/  0)|   0(   -/   -/    0)|    -|     -|1024|  0: 0: 7|      180000006      |
  kworker/u386:2 (77163/    2/   1/C  0)|   1(  0/  1/  -)|    0(  0/  0/  0/  -)|   0(   -/   -/    0)|    -|     -|  64|  0: 1:28|                     |
  kworker/u386:1 (76495/    2/   1/C  0)|   1(  0/  1/  -)|    0(  0/  0/  0/  -)|   0(   -/   -/    0)|    -|     -|  64|  0:25:42|                     |
            ksmd (  213/    2/   1/C  5)|   1(  0/  1/  -)|    0(  0/  0/  0/  -)|   0(   -/   -/    0)|    -|     -|  64|1375:39: 4|                     |
            sshd (15233/15142/   1/C  0)|   1(  0/  1/  -)|   95(  4/  0/  3/  0)|   0(   -/   -/    0)|    -|     -|  64| 31:13:22|      180010000      |
----------------------------------------------------------------------------------------------------------------------------------------------------------

 316.858 us [77222] |         } /* pipePrint */
   1.533  s [77222] |         guider.py(18483):             SystemManager.clearPrint()
            [77222] |         clearPrint() {
  17.881 us [77222] |           guider.py(7161):         del SystemManager.bufferString
  44.823 us [77222] |           guider.py(7162):         SystemManager.bufferString = ''
  71.049 us [77222] |           guider.py(7163):         SystemManager.bufferRows = 0
  95.844 us [77222] |         } /* clearPrint */
   1.533  s [77222] |       } /* printSystemStat */
  10.541  s [77222] |       guider.py(10509):                 self.reportSystemStat()

from guider.

honggyukim avatar honggyukim commented on May 20, 2024

I just want to see the contiguous guider output with uftrace without cleaning up the screen.

from guider.

iipeace avatar iipeace commented on May 20, 2024

It looks nice and seems python version of uftrace! 👍
But is it useful if I know all code of guider and use python cpu profiler(i.e., python -m cProfile)?
Anyway, I added a option -Q to print all lines in a stream for you!
I always wait for your contribution :)

from guider.

honggyukim avatar honggyukim commented on May 20, 2024

Thanks for your help! I've found that it works fine now. I need to do something else at the moment but I will come again to continue this work later. Thanks!

from guider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.