Полезные инструменты в Linux/Ubuntu-системах

By vedavrat

Generic tools available on a Linux/Ubuntu system

Process/memory/load
ps – Report a snapshot of the current processes.
top – Display Linux tasks.
htop – An interactive process viewer.
uptime – How long the system has been running.
free – Display amount of free and used memory in the system.
cat /proc/meminfo – Display memory usage.
dstat – A versatile tool for generating system resource statistics.
pmap – Report memory map of a process.
pgrep – Look up processes based on name and other attributes.
sar – Collect, report, or save system activity information.

IO/interrupts
vmstat – Report virtual memory statistics.
iostat – Report CPU statistics and input/output statistics for devices, partitions and network filesystems (NFS).
iotop – A ‘top’-like I/O monitor
sar – Collect, report, or save system activity information.

System call/file descriptors
strace – Trace system calls and signals.
lsof – List open files.
ltrace – A library call tracer.
fuser – Identify processes using files or sockets.
oprofile – A system-wide profiler, profiling all running code at low overhead (oprofile.sourceforge.net).
systemtap – Gather of information – diagnosis of a performance/functional problem (sourceware.org/systemtap).
ipcs – Provide information on ipc (interprocess communication) facilities, for which the calling process has read access.

Logs
grep – Print lines matching a pattern.
tail – Output the last part of files.
multitail – Browse through several files at once.
ack-grep – A grep-like text finder.

Network
iftop – Display bandwidth usage on an interface by host.
tcpdump – Dump traffic on a network.
wireshark – Interactively (GUI) dump and analyze network traffic.
ethtool – Display or change ethernet card settings.
ngrep – A network grep.
netcat – An arbitrary TCP and UDP connections and listens.
netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
vnstat – A console-based network traffic monitor.
iptraf – An interactive colorful IP LAN monitor.
ifstat – Report InterFace STATistics.
nmap – Network exploration tool and security/port scanner.
mtr – A network diagnostic tool (traceroute and ping programs in a single network diagnostic tool).
dnstracer – Trace a chain of DNS servers to the source.
sar – Collect, report, or save system activity information.

Filesystem
ls – List directory contents.
find – Search for files in a directory hierarchy (file system).
du – Estimate file space usage.
df – Report file system disk space usage.
file – Determine file type.

Binaries
gdb – A GNU Debugger.
elfutils – A collection of utilities to handle ELF objects (packages.debian.org/source/sid/elfutils).
frysk – A system monitoring and debugging tool to monitor the running processes/threads, the locking primitives/deadlocks (sourceware.org/frysk).
ldd – Print shared library dependencies.
strings – Print the strings of printable characters in files.

Java
jstat – A Java Virtual Machine statistics monitoring tool.
jmap – A Java process memory map.
jps – A Java Virtual Machine process status tool.
jconsole – A Java monitoring and management console (GUI).
jvisualvm – A Java Virtual Machine monitoring, troubleshooting, and profiling tool.
Memory Analyzer – The Memory Analyzer (MAT), Java heap analyzer to find memory leaks and reduce memory consumption (www.eclipse.org/mat).

Python
pdb – the Python debugger.

Ruby
ruby-debug
xray (allows to send ‘kill -3’ to ruby process)

PHP (debugging and profiling)
xhtprof – A hierarchical profiler for PHP.
xdebug – Debug PHP script by providing of debug information.

MySQL
mytop – Display MySQL server performance ‘top’-like info.
maatkit – A toolkit for users, developers, and administrators of open-source databases (www.maatkit.org).
innotop – A MySQL and InnoDB transaction/status monitor.
mysqltuner – A high-performance MySQL tuning script.

Virtualization (libvirt)
virt-top – A ‘top’-like utility for virtualization stats.