High School Football Videos | Main | More of the Linux goodness for you.

August 26, 2003

Linux Info

So here is some of what they are pouring into my head.
Non-computer types should run...

So if your ever on a linux box and would like to know about the
hardware your on here are some ways.

under the /proc dir are many useful files.
    cat /proc/cpuinfo - gives you all the info about your processor.
    cat /proc/meminfo - tells you all about your memory and how it is used.

I'm sure that you will run and look in your proc dir so I will give you some more info
about what you are seeing there.

First thing you will notice with an ls is that there are many directory names that are only numbers
(1, 4, 10, 4839) and on and on well these are the processes that are running on your box.
When you run ps -ef it comes here to get the info and you can too. If you go into one of these dirs you can learn much.
       try this cat /proc/(process number)/cmdline will tell what the command
       line was that started this process.
       Kinda handy no?


now for some network fun.

So you want to turn off ping response on heres how to do it real time
(later on I will show you how to make it permanent.)
as a side note remember that the proc file system is in memory.

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all (1 sets this variable on 0 sets it to off)
      1 = no ping
      2 = ping
   A note of warning the proc file system is live and the changes you make are instant you
   can bring your system to its knees without much effort playing here. The good side
   is that all of the data in proc is in memory and a reboot will bring back the original data.

Posted by ritilan at August 26, 2003 11:09 PM

Comments

Post a comment




Remember Me?

(you may use HTML tags for style)