TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Glances - an easy CLI overview of your system (CPU, mem, I/O)

250 点作者 cgbystrom超过 12 年前

23 条评论

boothead超过 12 年前
The app looks really nice visually, a few points though:<p>except Exception: pass<p>is generally considered to be a code smell. The problem being that when you're catching all exception information and throwing it away you will never know what went wrong and where. If you're doing a try/except Exception nested inside another except Exception then I would humbly suggest that you really need to think about refactoring and restructuring.<p>Also, anywhere that you see a repeating pattern, you might be better off wrapping it in a function or method rather than typing it out each time. For example in your __update__ method starting at about line 400 you've got pretty much the same code in two places with just a variable different between the two.
评论 #4471630 未加载
sciurus超过 12 年前
I will definitely try this out! Just from browsing the webpage it looks nice.<p>The psutil library doesn't use process accounting, does it? Without it, Glances will miss processes whose lifetime is within a single check interval.<p>As always when this topic comes up, I have to give a recommendation for atop. This LWN article goes into why it is awesome- <a href="https://lwn.net/Articles/387202/" rel="nofollow">https://lwn.net/Articles/387202/</a> . The logging and interactive examination of historical process-level metrics is the killer feature for me. Here are some screenshots- <a href="http://atoptool.nl/screenshots.php" rel="nofollow">http://atoptool.nl/screenshots.php</a>
vutekst超过 12 年前
If you like this, you might also like htop, which is similar but markedly faster at starting up.
评论 #4471472 未加载
CGamesPlay超过 12 年前
Just curious, is Glances the python script taking up 100% CPU and 1 GB of RAM in that screenshot?
评论 #4470862 未加载
mahmoudimus超过 12 年前
First, this is cool! Good job!<p>Would you run this or would you run htop? I'm not sure when I'd use one over the other.<p>Maybe someone less dense than I knows more and can tell me what the differences are?
评论 #4474138 未加载
wcchandler超过 12 年前
Not sure how this would work from a UI perspective but it'd be nice if you could add other servers to be monitored. So instead of me having 20+ terminal windows open, ssh'd into each box and running this app, I could run this app from a central server that's showing all of them together.<p>Again, I have no idea how to present that nicely.
评论 #4474004 未加载
评论 #4472620 未加载
losvedir超过 12 年前
Looks very nice. I'm a very happy user of iStat Menus for similar monitoring on OS X.<p>One thing that iStat menus lacks, and I was hoping Glances had (but appears not to) is a "top" like viewer for what is using bandwidth. Both applications only give the overall bandwidth usage. I'll see my bandwidth shoot up hundreds of Kbps out of nowhere and quickly try to determine what's using it through combinations of looking at open programs (maybe they're updating in the background), lsof -i, nettop if I can remember the name, but haven't been particularly keen on any of them. Any recommendations?
评论 #4471741 未加载
评论 #4471097 未加载
atechie超过 12 年前
This looks good. For cpu and memory checks I find htop to be more lightweight and functionality wise is pretty good too. It doesn't show disk stats though, for which something like atop should be used.
nodesocket超过 12 年前
Glances looks great. Also we love `htop`. <a href="http://htop.sourceforge.net" rel="nofollow">http://htop.sourceforge.net</a>
scott_karana超过 12 年前
Pretty sweet. One nitpick: any way of including disk wait?
xentronium超过 12 年前
You should apt-add glances-stable instead of glances-dev (the latter doesn't seem to work) on debian/ubuntu.<p>i.e.<p><pre><code> sudo add-apt-repository ppa:arnaud-hartmann/glances-stable &#38;&#38; sudo apt-get update &#38;&#38; sudo apt-get install glances</code></pre>
mschonfeld超过 12 年前
Seems to run decently on my Mac 10.8
评论 #4470864 未加载
zerd超过 12 年前
Nice! I like how it shows all the vital information in very little space. I've been using nmon for a while, which has some interesting features like graphing, but doesn't utilize all the screen space very well.
trustfundbaby超过 12 年前
Seems cool but I could not get this to install on Ubuntu 8 (old I know) ... even trying to do a wget gave me this error<p>"ERROR: Certificate verification error for github.com: unable to get local issuer certificate"
评论 #4471836 未加载
dazzawazza超过 12 年前
Runs well on my FreeBSD 9.0 box. Thanks.
ralph超过 12 年前
dstat(1) is another of this ilk, also Python. I prefer it because new results are printed under old, giving history in scrollback. If on a machine where these aren't available, `vmstat 1' is the standard historical fallback.
w1ntermute超过 12 年前
You could create a nice desktop widget out of this by piping it to Conky.
评论 #4471749 未加载
ck2超过 12 年前
Is it on yum for centos?<p>I was playing with htop but it's not really any better than top.
评论 #4471169 未加载
评论 #4470966 未加载
sounds超过 12 年前
Just a thought - ethtool and miitool provide link status for a network interface. I didn't study the code to see how this gets the network speed, but if it isn't using something like ethtool/miitool, you might want to.
alpeb超过 12 年前
This is extremely nice. Thank you!
adri9n超过 12 年前
Using it now, thanks for sharing!
amirf超过 12 年前
Wow... Kudos on a great job!
anon987超过 12 年前
You'll probably want to change the name. HP/UX has similar performance monitoring tools named Glance and GlancePlus that are unlocked via license keys. These tools have been around for at least 15 years, they are installed with the base OS (and thus are well known within the community), and perform the same functions as your software (performance monitoring).
评论 #4470780 未加载