On Tue, Sep 04, 2007 at 06:54:19PM EDT, Aaron Griffin wrote: > On 9/3/07, cga2000 <[EMAIL PROTECTED]> wrote: > > Is there any way I can display the following on the hard-status line: > > Something like: > http://img.phraktured.net/other/screen-status.png > > Sure! > Here's my current config: > http://phraktured.net/config/.screenrc > > And the script directory: > http://phraktured.net/config/.screen/
Thanks to both. I took the one-liner challenge and came up with these little horrors for %Mem & %Swap: backtick 1 60 60 awk '{if ($1=="MemTotal:") mt = $2; if ($1=="MemFree:") mm = $2; if ($1=="Buffers:") mb = $2; if ($1=="Cached:") mc = $2} END {printf ("%2.1f"), ((mt-(mm+mb+mc)) * 100 / mt);print "%M"}' /proc/meminfo backtick 2 60 60 awk '{if ($1=="SwapFree:") fs = $2; if ($1=="SwapTotal:") ts = $2} END {printf ("%2.1f"),((ts-fs) * 100 / ts );print "%S"}' /proc/meminfo I'd never used awk before .. no excuse of course .. but that would explain it now wouldn't it.. :-) I wrapped the two above so as not to bother anybody, but at present they are one-liners in my screenrc. I'll check later if I can use backslashes to escape the newlines w/o screen or awk getting their knickers in a twist. As to %CPU, I couldn't find anything useful in /proc, so I tried the following at the bash prompt: ps aux | awk '{if ($3 !="%CPU") t += $3} END {printf "CPU %2.2f", t; print "%"}' Gives me a printable result .. but .. the trouble is, I'm not sure at all this is conceptually correct. I'm beginning to think I don't really understand the meaning of nn% CPU at all! I haven't turned it into a screenrc backtick yet .. For one thing, I'm not sure screen's backticks support pipes.. if I need quotes .. etc. I'm also looking for something that would help monitor network traffic .. Not sure this makes sense, but I was thinking something that displays UP/DOWN Kb's, maybe? Not sure where I could get that from. And Aaron, thanks for the screenshot and matching scripts. Once you are given a shove in the right direction the programming is not difficult .. but coming up with a clear efficient display of your data with the limited capabilities of text mode is a different story. So that's going to help considerably. I only saw your post a few minutes ago .. but I will review the material carefully tomorrow and see if I can come up with something similar that does what I want. Thank You! _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users