|
Disk / File system tools
---------------------------------- man e2label man tune2fs nohup disown -h Network tools
--------------------- dpkg -L net-tools | grep bin /usr/sbin/arp /sbin/ifconfig /sbin/nameif /sbin/plipconfig /sbin/rarp /sbin/route /sbin/slattach /sbin/ipmaddr /sbin/iptunnel /sbin/mii-tool /bin/netstat ethtool mii-diag mii-tool xorg setup on debian:
xresprobe Linux archive utilities
------------------------------ ar tar cpio afio pax LZW compress gzip bzip lzop lzma zip rar arj Lha p7zip BsdTar shar unshar Linux hardware information Network bandwidth tools
------------------------------------ iptraf iftop bandwidthd vnstat darkstat /proc/net/dev Harddrive (storage || I/O) related VNC Stuff
--------------- linuxvnc - allows you to export shell session (ALA tty) to remote machine using VNC xmove - Change the X11 server an application is using on the fly vnc4server - The standard way to get a new X11 screen from a linux server x11vnc - Export your current work environment to a remote VNC session. vino - Gnome vnc binding utility. Reference: --------------- 1. http://www.debian-administration.org/articles/135 2. http://gentoo-wiki.com/HOWTO_Use_VNC_to_connect_to_existing_X_Sessions 3. http://www.vanemery.com/Linux/VNC/vnc-over-ssh.html Other remote desktop implementations: --------------------------------------------------------- http://sourceforge.net/projects/synergy2 http://freenx.berlios.de/ http://tldp.org/HOWTO/XDMCP-HOWTO/ conspy (For viewing ``physical console'' on the server) binary install :
makeself diff and merge tools
----------------------------- rcsmerge_emacs gvim vim kdiff3 xxdiff opendiff TortoiseMerge emacs xemacs meld http://www.venge.net/monotone/docs/Default-hooks.html NTP Stuff
-------------- For debian: http://www.debian-administration.org/articles/25 #!/bin/bash packages: ntpdate ntp chrony Memory Utilization
--------------------------- free top cat /proc/meminfo torsmo vmstat sar -r sar -R mpstat Useful development libraries libraries
------------------------------------------------------------- Trouble Shooting
------------------------ ++ Network .......... http://freshmeat.net/redir/scapy/39016/url_homepage/scapy ++ FileSystem .......... http://www.pixelbeat.org/fslint/ ++ Process .......... http://www.opersys.com/LTT/ .......... http://oprofile.sourceforge.net/ .......... http://sourceware.org/systemtap/ .......... http://sourceware.org/frysk Process memory analyses:
pmap library analyses:
ldd from man 7 signal
Signal Value Action Comment ------------------------------------------------------------------------- SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt from keyboard SIGQUIT 3 Core Quit from keyboard SIGILL 4 Core Illegal Instruction SIGABRT 6 Core Abort signal from abort(3) SIGFPE 8 Core Floating point exception SIGKILL 9 Term Kill signal SIGSEGV 11 Core Invalid memory reference SIGPIPE 13 Term Broken pipe: write to pipe with no readers SIGALRM 14 Term Timer signal from alarm(2) SIGTERM 15 Term Termination signal SIGUSR1 30,10,16 Term User-defined signal 1 SIGUSR2 31,12,17 Term User-defined signal 2 SIGCHLD 20,17,18 Ign Child stopped or terminated SIGCONT 19,18,25 Cont Continue if stopped SIGSTOP 17,19,23 Stop Stop process SIGTSTP 18,20,24 Stop Stop typed at tty SIGTTIN 21,21,26 Stop tty input for background process SIGTTOU 22,22,27 Stop tty output for background process The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. # kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1 64) SIGRTMAX Unit Testing
C Unit Tester - http://www.falvotech.com/content/cut/ |
| Traffic monitoring by owner / process ID Amos Shapira |
| show details | Sep 6 |
On 15/08/06, Nadav Har'El <nyh@math.technion.ac.il> wrote: suggested, is to use iptables: Run Skype, and then use iptables' OK, so I took Nadav's advise which turned out to be pretty simple: 1. " addgroup skype" and "chown skype /usr/bin/skype; chmod g+s skype /usr/bin/skype" in order to run skype in its own group. That way I hope to: a. avoid multi-cpu troubles (though my current system is single-core) b. speed things up by having to match gid's instead of command names. 2. setup iptables rules to the effect of: # match all outgoing packets from gid skype and mark their connection iptables -A OUTPUT -m owner --gid-owner skype --out-interface eth0 --protocol tcp -j CONNMARK --set-mark 1 iptables -A OUTPUT -m owner --gid-owner skype --out-interface eth0 --protocol udp -j CONNMARK --set-mark 2 # all packets which match the connection should go through the skype rule iptables -A OUTPUT -m connmark --mark 1 -m comment --comment skype-out-tcp iptables -A OUTPUT -m connmark --mark 2 -m comment --comment skype-out-udp # match all packets on Skype's public TCP port and mark their connection iptables -A INPUT -p tcp -m tcp --dport 31673 --in-interface eth0 -j CONNMARK --set-mark 1 iptables -A INPUT -p udp -m udp --dport 31673 --in-interface eth0 -j CONNMARK --set-mark 2 # all packets which match the connection will be counted by these iptables -A INPUT -m connmark --mark 1 -m comment --comment skype-in-tcp iptables -A INPUT -m connmark --mark 2 -m comment --comment skype-in-udp This allows me to distinguish in vs. out traffic and tcp vs. udp traffic. A simple perl script that uses IPTables::IPv4 perl module (i.e. direct access to the syscalls) and looks up at the comments gives me all 8 numbers (tcp/udp, in/out and packets/bytes). I'll provide the scripts if anyone is interested. If you see an error in what I did then I'd appreciate a howler. I'm now trying to find a way to identify the "Port Unreachable" ICMP packets which I see to be sent back to Skype's UDP port (and are currently dropped together with other ICMP packets). Current plan is to use the "u32" extension. If someone knows how to achieve that (the ICMP packet recognition, either using u32 or whatever) I'd appreciate a pointer. And double-thanks to Nadav for pointing me to read the iptables manual more carefully - I found the geoip module mentioned there very promising. Cheers, --Amos |