FAQ   Search   Memberlist  
Profile    Log in to check your private messages    Register    Log in
nano - hmmmm

 
Post new topic   Reply to topic    BLAG Forum Index -> open discussion
View previous topic :: View next topic  
Author Message
berkbw
PostPosted: Sat Dec 22, 2007 8:49 pm    Post subject: nano - hmmmm Reply with quote

A couple of days ago, I was looking to edit some small text file quickly. So, I invoked nano. Nothing.. Oh, well, I have a bunch of stuff that does that. Today, I noticed that BOINC wasn't running - and couldn't run the cpu benchmark. So - I ran top, and 'lo and behold - nano uspng 94% of cpu!!. Killed it and allwas well after.

b-

john maclean
PostPosted: Sun Dec 23, 2007 11:45 am    Post subject: Reply with quote

Did you edit a file with nano a while ago and forget to close that editing session? you can use `top` and look for for that process or use `pgrep nano` example
Code:
 pgrep scp
3170
Means that scp is running on this box with a process number as shown.

_________________
BLAG 'em up!
jebba
PostPosted: Sun Dec 23, 2007 6:43 pm    Post subject: Reply with quote

jayeola i love how you find every obscure command. How handy. Sheez, I can't believe the endless world of unix... I just realized you can do `grep --color foo bar` the other day...
john maclean
PostPosted: Sun Dec 23, 2007 8:41 pm    Post subject: Reply with quote

This is a one-liner I wrote some time ago to help me out when choosing what modules to include in a kernel
Code:
 while true; do read -p "kernel module : " ASK;  grep -i $ASK --colour=always /boot/config-$(uname -r) ; done

The word "colour" depends on your locale and the rest depends if you are using a config-foo file for the running kernel.

The output looks like this:- http://www.jayeola.org/dump/ss-forum-1-colour-grep.png Feed the script with "sensible names" like alsa, snd, intel or any other names that you see in the linux tree.


_________________
BLAG 'em up!
jebba
PostPosted: Sun Dec 23, 2007 8:52 pm    Post subject: Reply with quote

john maclean wrote:
The output looks like this:- http://www.jayeola.org/dump/ss-forum-1-colour-grep.png


Of course using --colour in your example doesn't show the color change since you are also using red as your main text. That created a huge blob of ERT (evil red text). ;)

-Jeff

john maclean
PostPosted: Sun Dec 23, 2007 8:56 pm    Post subject: Reply with quote

Check it out now ;-)

_________________
BLAG 'em up!
Display posts from previous:   
Post new topic   Reply to topic    BLAG Forum Index -> open discussion
Page 1 of 1

Protected by Anti-Spam ACP