Following is the list of OS commands apart from basic commands output that are useful in diagnosing the problems at OS end causing the slow performance to the Database or application side. 1. iotop The iotop command is top like utility for disk I/O. It watches I/O usage information output by the Linux kernel (requires […]
Fedora
How to use perf tool for tracing similar to dtrace
Basics Perf is useful profiling tool which might be useful to trace kernel/application calls/functions and many more. For example to start perf as a live monitor tool similar to top execute: # perf top It will display performance counters in real time. Example output: PerfTop: 474 irqs/sec kernel:100.0% exact: 0.0% [4000Hz cpu-clock], (all, 6 CPUs) […]
ldconfig Command Options
ldconfig command is used to tell the system about new locations of shared libraries, the ldconfig command uses information provided by the /etc/ld.so.conf file. The ldconfig command creates a cache database of all libraries based on the configura- tion file. This cache is normally stored in the /etc/ld.so.cache file. Here is the syntax of the […]
ldd Command Options in Linux
You can see what shared libraries a specific command uses by using the ldd command. Here is the syntax of the ldd command: # ldd [options] FILE For example: # ldd /bin/cp linux-vdso.so.1 => (0x00007ffc35df9000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f93faa09000) libacl.so.1 => /lib64/libacl.so.1 (0x00007f93fa800000) libattr.so.1 => /lib64/libattr.so.1 (0x00007f93fa5fa000) libc.so.6 => /lib64/libc.so.6 (0x00007f93fa239000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f93f9fd8000) […]
How to Delete the Files Which are Older Than n Days WITHOUT Using find Command
Question: How to delete the files which are older than n days WITHOUT use find command? For some reason, the find command is not used to check which files are older than n days, as a substitute, ‘tmpwatch‘ can be used The syntax is: # tmpwatch [time in hours] [directory] For example, to delete files […]
How to monitor the status of dm-multipathing and multipath devices (path groups) in Linux
Monitoring The multipath command can be used to monitor the status of multipaths. When used with one -l option, it will show a quick overview of multipath topologies. If the -l option is specified twice (-ll), it will also perform a check on all paths to see if it is active. If everything is fine, […]
Understanding Linux multipath (dm-multipath)
What is multipathing? Multipathing allows the combination of multiple physical connections between a server and a storage array into one virtual device. This can be done to provide a more resilient connection to your storage (a path going down will not hamper connectivity), or to aggregate storage bandwidth for improved performance. As an example, the […]
How to change the default permissions on /var/log/audit/audit.log file in CentOS/RHEL
Question: How to configure auditd to change the default permissions on the /var/log/audit/audit.log from 0600 to 0640 and also changing the group ownership of the file? By default it’s not possible to change permissions on the /var/log/audit/audit.log file using ACLs, instead “log_group” parameter can be set under the file /etc/audit/audit.conf. The Steps In this example, […]
A File Is Claimed to Be Disappearing – How to monitor a file for deletion in Linux
Question: A file seems to be disappearing and no direct reason for its disappearance can be found. How can we monitor the file access, especially the deletion of a particular file in CentOS/RHEL system? A file can be monitored through its lifecycle by using the Linux auditd service. The Steps 1. To install it on […]
How to Stop Audit Log Entries Written to System Logs in CentOS/RHEL 6
This post explains how to stop audit log entries written to system logs. 1. Check the file /etc/audisp/plugins.d/syslog.conf. By default, the file “/etc/audisp/plugins.d/syslog.conf will have the below line. args = LOG_INFO This will allow syslog to log audit logs into /var/log/messages. In addition audit.d will log all the audit events to /var/log/audit/audit.log too and this […]