Debian - cannot execute binary file: Exec format error - How to reinstall a package. [SOLVED]

This morning I tried to capture the traffic on Debian server and got an error:

debian# tcpdump -i eth0
-su: /usr/sbin/tcpdump: cannot execute binary file: Exec format error

Apparently this server experienced a problem with local disks and file got corrupted so I had to reinstall the package:

debian# dpkg --purge tcpdump
debian# apt-get install --reinstall tcpdump

Good luck!

Cacti - Switching to 1 minute polling interval. [TESTED]

By default the Cacti has 5 minute interval polling. To get higher resolution I decided to reconfigure it to 1 minute. BTW, I’ve found this thread the most detailed.

For example, we have some “Cisco - SAA” graph templates:

• “Console” > “Data Templates” > “Cisco Router - SAA”:
– “Associated RRA’s” > Add “Hourly (1 minute average)”.
– Change “Step” from 300 to 60.
– Change “Heartbeat” from 600 to 120 for each Data Source Item (http_dns_rtt Delete, http_rtt Delete, http_tcp_rtt, etc…).
• Change crontab interval for poller:

vi /etc/crontab
* * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

• “Console” > “Configuration” > “Settings” > “Poller” > Change “Poller Interval” and “Cron Interval” to “Every Minute” > Save.
• “Console” > “Utilities” > “System Utilities” > “Rebuild Poller Cache”.
• Check log files to make we have no any error. “Console” > “Utilities” > “System Utilities” > “View Cacti Log File”.

DIG on CentOS 7 (in addition to the nslookup). [TESTED]

Installation process

• To find a package name that provides dig utility:

yum whatprovides *bin/dig*

• To install the package:

yum -y install bind-utils


• To show A entries, the same as “nslookup” or “nslookup -type=a”

dig @ +noall +answer              4563    IN      A

• To show NS entries, the same as “nslookup -type=ns”:

dig @ ns +noall +answer              1068    IN      NS              1068    IN      NS              1068    IN      NS

• To show PTR records (+noall +answer are not applicable), the same as “nslookup -type=ptr”:

dig @ -x

Whois on CentOS 7. [TESTED]


[root@hostname ~]# whois
-bash: whois: command not found
[root@hostname ~]#

How to find package name whois/jwhois/whatever:

[root@hostname ~]# yum whatprovides *bin/whois*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
base/7/x86_64/filelists_db                               | 5.8 MB     00:01
whois-5.1.1-2.el7.x86_64 : Improved WHOIS client
Repo        : base
Matched from:
Filename    : /usr/bin/
Filename    : /usr/bin/whois

[root@hostname ~]#

Install it:

yum -y install whois

Cacti - Installing plugins. [TESTED]

According to the official Release Notes for Cacti v0.8.8, Plugin Architecture (PA) is now part of Cacti, so it has been merged. On test host I have Cacti Version: 0.8.8c, Plugin Architecture Version: 3.1.


I can’t use Cacti without it, this plugin is a MUST, I would say. So:

cd /var/www/html/cacti/plugins/
wget -O realtime-v0.5-2.tgz
tar zxvf realtime*.tgz
rm -f realtime*.tgz

less realtime/README

mkdir -p /usr/local/share/cacti/cache
chown apache:apache /usr/local/share/cacti/cache

• «Console» > «Configuration» > «Plugin management» > «Install Plugin»
• «Console» > «Configuration» > «Plugin management» > «Enable Plugin»
• «Console» > «Configuration» > «Settings» > «Misc» > Cache Directory: /usr/local/share/cacti/cache > «Save»
• «Console» > «Utilities» > «User management» > «admin» > «Plugin -> Realtime» (enabled by default)

After these steps list “Realtime” button will be available on the left side of any graph.

Admin area