Comments (12)
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.
Hi, @honggyukim,
You can use -i option and -N option.
$ guider top -N 3
$.guider top -N 1 -i 3
from guider.
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.
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.
Thanks @iipeace! It works now. I have one more question. : )
Is it possible to see the result without screen clear?
from guider.
@honggyukim,
You can use -R option and -o option.
$ guider top -R 1, 3 -o .
and check guider.out file :)
from guider.
Thanks! It would also be really nice for me to print the output on console as well in some ways.
from guider.
may I ask you the reason why do you wanna get the output without screen clear?
from guider.
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.
I just want to see the contiguous guider output with uftrace without cleaning up the screen.
from guider.
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.
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)
- Subsecond cpu top feature HOT 1
- Checking status for data recording HOT 17
- Fix exception handling for the import of essential modules HOT 3
- Split the grown script into loadable modules HOT 6
- Fix specifications of exit codes for the Guider launcher HOT 1
- Choose an error code according to a wrong depth type HOT 1
- Choose an error code according to a failed priority setting HOT 1
- Increase the usage of augmented assignment statements HOT 13
- Addition of a build system generator HOT 4
- Improve build support for newer Python versions HOT 1
- Fix error indication for a successful program analysis HOT 7
- Export tracing data in tabular form HOT 8
- Export tracing records in rows instead of multi-line structures HOT 49
- Increase selection of data output streams HOT 6
- Provide numerical data instead of texts in output streams HOT 2
- Support the configuration of a shell environment before tracing a passed command HOT 10
- Reconsider “import gc” HOT 1
- Checking repetition for dictionary entry “statx” HOT 2
- Is it possible to record the process usage based on process id HOT 5
- release? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guider.