date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,424,409,229,000 |
In our company there are around 30 to 40 virtual linux machines. Every linux vm has maybe 3 partitions.
And every now and then, somehow, a partition gets full and brings one or more applications to a standstill.
I know, we can write cronjob batch scripts, that run every 30 minutes, and when
a threshold is passed, ... |
There are plenty of open source (and proprietary) monitoring tools designed to solve this problem. They rely on tools within Linux, and they in turn rely on system calls within the kernel.
Some tools focus on data gathering and monitoring, while others focus on alerting, which you pick depends on your primary need.
T... | Has linux got some kind of monitoring or alerting infrastructure build into itself |
1,424,409,229,000 |
I need to get a full list of files modified, and if possible files accessed too, by a complex script, as well as all files accessed at the same time of the script running by any other process.
So i want to START logging all IO file access before the application start, and then STOP logging when it ends. (or inspect f... |
You could use a marker file, touching it before you perform the operation of your main concern, and then using the find command with the -newer or -anewer options to find files that were modified or access after you touched the marker file.
touch /tmp/marker
perform-some-operation
find /path/to/dir -newer /tmp/marker
... | How to get list of touched files between 2 points of time? [duplicate] |
1,424,409,229,000 |
Running vmstat will give you the average virtual memory usage since last reboot. The si and so values give the average virtual memory I/O. For example:
root@mymachine# vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in ... |
The memory information isn't averaged; vmstat shows the instantaneous memory information as provided in /proc/meminfo. So you can use the memory information from vmstat without worrying about changes since the last boot.
The values that are accumulated since boot concern the CPU usage, interrupts and context switches,... | Reset vmstat statistics without rebooting |
1,424,409,229,000 |
We use Nagios here for monitoring our servers.
On the test network I upgraded to Debian 9/Stretch, the memory monitoring box/object in our Nagios monitoring platform says CRITICAL and next to it, CHECK_MEMORY CRITICAL - Unable to interpret /usr/bin/free output.
The problem is in several servers; the check is done via... |
I have followed the problem, as in:
$ /usr/lib/nagios/plugins/check_memory
MEMORY CRITICAL - Unable to interpret /usr/bin/free output
What I found is the output of the free command in procps changed the output format.
$free -m
old format:
total used free shared buffers cached
Me... | Nagios memory free plug-in misbehaving after upgrade to Debian Stretch |
1,424,409,229,000 |
Sometimes my wifi is connected to router but my router is not connected to internet. How can I execute a command when my internet is back (from command line)? I want to execute:
mpg123 /home/user/file.mp3
|
Try this:
#!/bin/bash
while :; do
ping -c 1 8.8.8.8 >/dev/null 2>&1
if [ $? = 0 ]; then
break
else
echo 'No internet'
fi
sleep 1
done
mpg123 /home/user/file.mp3
It will show you 'no internet' message if there is no ping response. And if it gets the response it will execute your com... | How to execute a command when internet is back |
1,424,409,229,000 |
I'm running into a problem when using sar to collect live system statistics. When I run a sar command such as the following, I get the right output:
$ sar -r 1 -o /tmp/memory_usage
Linux 4.15.0-70-generic () 29/12/20 _x86_64_ (60 CPU)
18:26:55 kbmemfree kbavail kbmemused %memused kbbuffers kbcached kbc... |
I'm an idiot, found the answer. Apparently when you tell sar to collect system statistics into a file, it outputs everything into it, not just the options you passed it.
So, what the command sar -r 1 -o /tmp/memory_usage is really saying is: "capture all options at a sample rate of one per second, and record them in t... | sysstat sar only collects cpu usage |
1,424,409,229,000 |
I was wondering, if there is a program similar to time, but instead of just printing out the time it took to execute the command, it also prints out the average CPU and Memory usage.
Alternatively a program which records the CPU and memory usage every couple of seconds and then writes it to a file would also work.
Any... |
Sysstat package is useful. You can customize how often and how many times to harvest
the information. It consists tools for CPU usage , memory , processes. Also can store information in different formats
iostat: Reports all statistics about your CPU and I/O statistics for I/O devices.
mpstat: Details about CPUs (indi... | Program to monitor CPU and Memory usage |
1,424,409,229,000 |
I have a fresh install of Xubuntu 18.04 LTS. I'd like to display in text, not in graphical form, the CPU (% used), RAM (% used), and Battery usage (% avail.) in the top panel near the clock.
I'm having trouble learning how to do this or whether it's possible because of outdated information from previous versions and t... |
If you can't find a prepackaged solution, you can roll your own.
As part of Xfce, the Generic Monitor panel item should be available in your panel's "Add New Items" list. If not, it should be available as xfce4-genmon-plugin in your repo. From it's About dialog: "Cyclically spawns a script/program, captures its output... | Show CPU, RAM, and Battery values in text in Xubuntu's top panel |
1,424,409,229,000 |
When running the following command
tcpdump -i deviceName 'host 1.2.3.4' -q -w /mypath/dump.pcap
the dump file contains a huge amount of data because there's a lot of traffic. However, I only need to save the header details of each packet, not the entire contents. I tried using the -q switch (for "quiet") but that's ... |
I was in the same situation and I solved it by adding -s 96
| How to record only the header info when using `tcpdump` |
1,424,409,229,000 |
I already wasted days to look for a very minimalist (cpu/ram/ping/ssh/disks) monitoring tools that discover hosts by itself instead of installing a client application on each host. (I can accept giving a temporary account with ssh-key) but not any local binaries installation.
(because the solution have to be movable ... |
Seems like you do not use nagios properly. In nagios you define hosts, host groups, services per host group. And you need to set/change host names only and (if needed) reallocate them over host groups.
Other possible solution is to use SNMP. Per host you define snmp agent with probes for the services you need. And one... | Monitoring solution wihtout client-install |
1,424,409,229,000 |
I use zabbix to monitor a log file, and I want zabbix to send a mail every time a new line coming in the log file. I define the trigger:
{xxx:log[/tmp/log,"error"].str(error)}=1
I find that zabbix does the 'action' (send a mail) only when the trigger's status changes.
So, when the first line comes into the log file,... |
Using your original expression {xxx:log[/tmp/log,"error"].str(error)}=1, mark the "Multiple PROBLEM event generation" checkbox in the trigger properties.
| zabbix action on log file |
1,424,409,229,000 |
I'm looking to migrate a monitoring script from Windows (Powershell) to Linux (Shell script).
One of the things I check in Windows is whether an application is 'Not Repsonding'. (e.g. Open Task Manager and it says either "Running" or "Not Responding")
Is there an equivalent in Linux, and if so, how do I find it? I've... |
In linux, processes can be in different states:
Running(R): This is a state where a process is either in running or ready to run.
Interruptible(S): This state is a blocked state of a process which awaits for an event or a signal from another process
Uninterruptible(D): It is also a blocked state. The process is force... | How to Find Non-Responding Applications in Linux |
1,424,409,229,000 |
Environment
Debian Linux 11.5 "bullseye"
Conky 1.11.6 (compiled 2020-08-17, package 1.11.6-2)
Xorg 1.20.11 (package 2:1.20.11-1+deb11u2)
FVWM version 3 release 1.0.5 (built from git 23854ad7)
Problem
I am trying to reduce the Conky window to show just a single graph (chart, plot) with absolutely no other elements. ... |
The conky object voffset changes the vertical offset position of the object following it by a given positive or negative number of pixels. A construction like the following may do what you need, where a negative value determined by trial-and-error should be substituted for each of y1 and y2:
conky.text = [[${voffset y... | Conky 1.11.6 - Want to eliminate gaps above/below graphs |
1,624,839,071,000 |
I open pavucontrol when playing a music on speaker.
Click the input Devices ,line in and front microphone ,rear microphone are all unplugged,so What do the input device monitor--Monitor of Family 17h(Models 10h-1fh) HD Audio Controller Analog Stereo watch?It is watching the output device --line out ?
Card #1
Nam... |
In Pulseaudio, every sink (audio destination, output) has an associated source (audio source, input) that is called monitor.
For some reason, your audio hardware provides a sink that is called "Family 17h (Models 10h-1fh)". That's an unusual name, and probably shows only up because your hardware manufacturer put some ... | What do the input device monitor watch? |
1,624,839,071,000 |
Is there a tool that can be used to monitor the traffic a web server is processing in real-time from the command line?
I'm looking for a cli ncurses tool like nload, but one that can show the requests per second going to a web server like nginx or apache (or a cache like varnish) via mod_status or stub_status.
|
It doesn't look like nload, but you an get a ton of useful information from your web server's access logs (NCSA, W3C, squid,or any user-defined custom log format) in an ncurses-based tool called goaccess
In Debian, run:
sudo apt-get install goaccess
goaccess /path/to/access.log -c
It will look something like this
| cli real-time monitoring of web server traffic per second over time (ncurses) |
1,624,839,071,000 |
My /proc/vmstat contains the following rows:
pgalloc_dma 0
pgalloc_dma32 288126724
pgalloc_normal 33952724486
pgalloc_movable 0
I'm wondering what they are measurements of. Are they counters of the total number of page allocations done for as long as the machine has been alive or are they gauges of the current number... |
The pgalloc rows reflect PGALLOC events, which count page allocations per CPU and per zone since the system was booted (and /proc/vmstat folds all the per-CPU values into a single system-wide value). There’s a corresponding pgfree which counts page freeing events (not per zone).
| What does pgalloc_(dma|dma32|normal|movable) in /proc/vmstat measure? |
1,624,839,071,000 |
I need a tool that monitors output of other command, and when it prints specified string, eg. "error", stops monitored command. Then I modify some environment and files and continue job. Is it possible?
Edit:
Example:
Have a following job.sh
for i in $(ls)
do
echo file $i
sleep 0.1
cat $i
done
When run in... |
% ./mystery
a
b
c
%
One could issue the STOP signal to a program and then CONT to continue it; the following TCL code waits for b to appear in the output and at that point stops the process, which should remain stopped until the user types a line for expect_user to act on (at minimum a newline).
#!/usr/bin/env expec... | How to pause command when it output some string? |
1,624,839,071,000 |
I'm running Linux 4.16.8-1-MANJARO #1 SMP PREEMPT x86_64 GNU/Linux.
I've installed the sysdig package, and trying to run it, I see:
$ sudo sysdig
Unable to load the driver
error opening device /dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.
How do I load the required mod... |
I needed to install the kernel headers:
sudo pacman -S linux416-headers
As part of this process, the sysdig module was installed:
:: Running post-transaction hooks...
(1/3) Updating linux416 module dependencies...
(2/3) Install DKMS modules
==> dkms install sysdig/0.21.0 -k 4.16.8-1-MANJARO
| Error opening device /dev/sysdig0: make sure sysdig-probe module is loaded [closed] |
1,624,839,071,000 |
An application is already running without command output, only GUi.
How can I grab the application's command output from a new terminal window?
Another application is already running as CLi, but I would like to monitor that specific application from a different window or even remotely without affecting the applicatio... |
This is very complicated for a running application. You need to attach a debugger, close the file descriptors 0, 1, and 2, open a new controllingf terminal and open the file descriptors accordingly. Probably not even this works if the app notices that it does not have a controlling terminal and thus does not use stdin... | How to monitor an already running application in a new Bash Terminal window? [duplicate] |
1,624,839,071,000 |
I have a somewhat painful net service provider. In order to mitigate the issue, I usually use something like
$ ping debian.org
which basically goes ad infinitium unless I break it via CTRL+C
I find pinging outside the host country is much more effective than pinging a domestic/same country server as at times inter... |
Could the simple ping be misused in sending ping of death via various computers and my ping/computer would be an accomplice without meaning to?
No.
The Ping of Death is a kind of attack carried out by sending a specially crafted ICMP packet to a (unpatched) machine in order to crash it.
A ping flood is a DoS attac... | network etiquette, pinging, network connectivity and DDOS |
1,624,839,071,000 |
I have built a little NAS-like device on armbian, that uses external harddisks for its file serving purposes. The (hardware) interface only provides a reduced SATA-command set and overrides some APM/AAM/standby functions, but I would like to have a longer interval until standby.
I am succesfully able to keep the driv... |
Perhaps you can just poll the counters of the number of read/write operations on the block device, and do your action when they no longer change. For a block device like sda, the statistics are in /sys/block/sda/stat, and the columns are described in the kernel Documentation/iostats.txt. In particular columns 1 and 5... | How can I detect time of last harddisk/samba or zfs activity for a ifplugd like action? |
1,624,839,071,000 |
I tested mdadm software RAID on a Debian 9 virtual machine. I migrated to RAID myself (i.e. didn't rely on the installer).
It works nicely, and dpkg-reconfigure mdadm even offered to set up monthly scrubs and email alerts. I can see this runs /sbin/mdadm --monitor --scan. However mail -u root shows no mail after bo... |
Although dpkg-reconfigure mdadm defaults to sending mail to root, Debian's Mail Delivery Agent no longer supports sending mail to root. If you left everything as default, you need to use mail -u mail instead. The best approach is to make sure all root mail is directed somewhere it will be read - you can use your nor... | mdadm RAID monitoring on Debian |
1,624,839,071,000 |
I installed glances as a python package in the home directory:
pip install --user glances
How can I launch glances?
[me@server]$ glances
-bash: glances: command not found
|
I just checked the glances github.io and it presented user install as:
export PYTHONUSERBASE=~/mylocalpath
pip install --user glances
And ensure the local path is part of your $PATH:
export PATH=$PATH:~/mylocalpath/bin
and you should be set.
| How can I launch glances when installed as a python package in the home directory? |
1,624,839,071,000 |
I am running some experiments that use cpu, disk, and network resources.
(by the way, I use Cent OS 7)
I want to measure its cpu, disk, and network resource usage.
Some tools I know (dstat, iostat) only provides a second as the minimum interval between two measurements.
How can I take several measurements even within ... |
Hopefully someone can point you to some tools to do what you want but if not and you're committed you could get the data straight from the source. iostat mostly is just parsing special files like /proc/diskstats and those files are updated whenever you read them. I just did a quick test where I read diskstats many tim... | How to measure disk and network IO more frequently than a second? |
1,624,839,071,000 |
I need to monitor an Lenovo system x3650 m5 (8871) server. Unfortunately lm_sensor just show the CPU temperature. Do anyone have an advice, how I could monitor the fan speed with an commandline tool?
Output sensors:
sensors
power_meter-acpi-0
Adapter: ACPI interface
power1: 141.00 W (interval = 1.00 s)
core... |
Your system has a correctly configured BMC with IPMI support, so you should be able to use ipmitool locally to extract all the monitoring information supported by your BMC:
yum install ipmitool
ipmitool sensor
(assuming the ipmi_si module is loaded, which should be the case on RHEL 7 on your setup). The interesting v... | Monitoring CPU fan speed on Lenovo system x3650 m5 (8871) on RHEL7 |
1,624,839,071,000 |
I would like to set up some monitoring for a custom application. I want to be able to monitor when a service goes down or stops working and if this happens, find a way to receive these alerts via email. I have been researching and it looks like I can do the first part of this task using rsyslog. I wanted to confirm th... |
The "or stops working" part is not part of rsyslog's description, and because it's so abstract most monitoring software lets you run a script to evaluate if the service has stopped working so you might as well just make your own service or crontab script, the core of which might look like this;
curl -s -m 5 "$URL" >/d... | Monitoring using rsyslog |
1,624,839,071,000 |
I am trying to install Zabbix on redhat 7 64bit. The zabbix server installed successfully with command yum install zabbix-server-mysql
But I am getting conflicts with php70u with php56u when I tried to install zabbix web console. I execute the following command : yum install zabbix-web-mysql
The following is the outpu... |
Finally after many hours of search and no one feedback, I was able to fix my issue. I am sharing here so it's might helps other in the future who are facing the same issue.
First, you need to install yum replace :
yum install yum-plugin-replace
After replace, php-common with your confict php version. In my case, it i... | Zabbix web install Redhat conflicts php |
1,624,839,071,000 |
During weekend my Debian based proxy crashed due to insufficient free space. After reboot it was fine again, so on monday I went hunting for logs and/or explanations for saturday hang but I couldn't find anything.
Grepped any kind of stuff in /var/log/*, checked crontab, mail queue... The only thing I found was monito... |
You can use atop to debug stuff like this. atop can run in realtime, but more critically for your case, it can show and analyse snapshots from the past captured in logs. It logs a lot of different metrics, so you likely won't be left thinking "damn, I wish I logged that" after the fact. :-)
On Debian, you can install ... | How to detect which process filled up disk space |
1,624,839,071,000 |
On a linux server with dhcpd that acts as the internet gateway for all clients of the LAN: how can I monitor the internet usage based on IP/MAC address, and deny internet access if a certain bandwidth consumption has been exceeded?
|
On Linux, you could get this done with some scripting:
Create firewall rules with iptables so that all bandwidth for each client passes through a separate rule. The firewall subsystem in the kernel will count network packets and bytes that a particular rule matched. You can see the counters if you run iptables -vL. Y... | Monitor and limit internet bandwidth per network client |
1,624,839,071,000 |
I know I can use incron or inotify to monitor file creation
1- how can I monitor only the creation of .txt files using incron?
2- Is there any other ways or scripts I can use to monitor .txt creation without using incron or inotify?
|
Incron itself doesn't offer filtering on file names, you can only monitor a directory and all of its files and its subdirectories' files recursively. If you're only interested in some of the files, test the file name in the action.
/some/where IN_CREATE /home/user78050/bin/monitor-file-creation $#
where monitor-file-... | How to monitor create a txt file without using incron? |
1,624,839,071,000 |
I would like my server to send a mail to me when someone connects remotely over ssh to my server.
who only gives me back the Username, TerminalID and Date. I cannot use only that, I need to check for the IP someone uses to connect to me.
So the triggering part would be an external IP.
How can I achieve that?
EDIT: w... |
You can add some shell scripting to /etc/bashrc or /etc/bash.bashrc maybe bepending on your linux distribution. Those are executed when user logs in remotely via SSH. Just test if there is $SSH_CLENT variable to distinguish the ssh login.
There will be other usefull variables for your needs, like:
SSH_ASKPASS=/usr/lib... | How to send a mail when someone remote connects to my server |
1,624,839,071,000 |
What's the most effective way to monitor SSH access in Gentoo Linux?
My Gentoo box is operating locally behind my broadband router. I have SSH port forwarding on the router and a DNS entry pointing to my router on the internet. Is there a way to silently record what external domain/IP the incoming connection to my Gen... |
User authorization events are typically logged by the system logging daemon in /var/log. The default locations vary between distros, but it is often /var/log/auth, /var/log/auth.log, /var/log/secure. I don't have a Gentoo system handy, but the default install used to feature syslog-ng and log these events to /var/log/... | How to transparently monitor SSH access/network traffic in Gentoo/general linux? |
1,624,839,071,000 |
Possible Duplicate:
Access history of a file
I know if a file is "being accessed" I can use lsof to see who (which process) is accessing it, but lsof is slow and heavy and I don't think I would be able to run it fast enough to see if a file is accessed or not.
So it there a way to watch a file, and see if it eve... |
Assuming you're running Linux:
You can use the audit subsystem to monitor access to a particular file.
You can use the inotify subsystem to watch for activities on files. There is a nice API for inotify, which makes it more useful for somethings than the audit subsystem, but inotify does not provide you with any info... | How can I monitor if anybody (any process) access is certain file [duplicate] |
1,624,839,071,000 |
I'm currently investigating why I didn't get notified about a high memory utilization on one RHEL server from dynatrace. When checking the graphs of memory usage, both sar and dynatrace show different results.
On SAR it is showing that the server is using 90% for about 11 hours, here's the screenshot of that:
And on ... |
The reason for displaying different graphs is that both tools just do not achieve the same calculus when estimating memory usage.
With regards to labels & values as taken from /proc/meminfo,
dynatrace is reported using the following formula :
memory_used = MemTotal - ( MemFree + Active + Inactive + KReclaimable )
sar ... | Is there a reason why sar would show different monitoring statistics on memory than other monitoring tools like dynatrace? |
1,624,839,071,000 |
I am looking for a counter provided by the Linux kernel counting the number of memory allocations performed by tasks on the system. I want to watch for high velocity changes in this counter, using Prometheus, in order to detect when some task on the machine does something stupid like allocating memory in loops.
I have... |
There’s no such counter ready-made for you as far as I’m aware, but there are a number of ways to track system calls. I think the most straightforward is to use perf:
sudo perf stat -e syscalls:sys_enter_mmap -e syscalls:sys_enter_brk -I 1000 -a
This will show the number of mmap and brk calls per second, every second... | Memory allocation counter for Linux |
1,624,839,071,000 |
I've come up with the following command to check changes in memory use:
free -s 1 -h | awk 'NR%4==2'
This shows output like this:
Mem: 125G 32G 82G 404M 10G 91G
Mem: 125G 32G 82G 404M 10G 91G
Mem: 125... |
This example from man stdbuf is what you are looking for. It applies for the general case you want to pipe a stream to uniq, similar to this. And the reason is that uniq needs to see more lines to decide if current line should be printed or not.
EXAMPLES
tail -f access.log | stdbuf -oL cut -d ' ' -f1 | uniq
... | Stream changes in available memory |
1,624,839,071,000 |
I am using Debian Buster and would like to find out which process does the most writes on a specific partition, just like iotop but limited to a single block device?
|
iotop cannot do that because it reads processes IO counters (/proc/PID/io) which are common for all block devices, including virtual filesystems like tmpfs.
What you'll need to do is block I/O tracing:
https://tunnelix.com/debugging-disk-issues-with-blktrace-blkparse-btrace-and-btt-in-linux-environment/
https://www.c... | How can I see which process does the most writes on a specific partition? |
1,624,839,071,000 |
I'm running a Unix server with NTPD version 4.2.7. I have various clients using this as its main NTP server such as other unix servers, cameras, IOT devices, etc. I want to get a list of which IPs are using this NTP server to find out which clients would be affected if this UX server went down. The below is what I get... |
There isn't a clean solution to this problem. NTP communication happens over UDP therefore it is stateless, hence you can't check established connections.
What you can do without much effort is cook a tcpdump/tshark filter to keep track of connections over time. What I mean by that is sniffing the network and observe ... | How to see which devices on a network use your unix NTP server? |
1,624,839,071,000 |
We have 763 Red Hat 7.2 Linux machines with systemd, systemctl and the presto service:
systemctl status presto.service
● presto.service - Perforce Server
Loaded: loaded (/etc/systemd/system/presto.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-06-25 18:30:22 UTC; 22min ago
... |
Use presto-admin server status on each node to generate a status report.
Query repeatedly each of your 763 nodes for that staus.
Sort the result on the node URL and throw away all but the latest status.
Turn that into HTML with a script.
Generate an HTML page to display which might look something like this
by perpet... | Wanted: GUI interface to show status of services on many servers |
1,624,839,071,000 |
What is the ping and traceroute command option to use in order to check the connectivity between 2 machines (machine A and machine B) using my machine (machine C) ? How do I specify the source machine IP? ping -S machineAIP machineBIP or ping -I machineAIP machineBIP don't seem to work from my debian 8 machine.
|
While ping allows you to set intermediate hosts, I think you can only do this if the intermediate hosts are willing to accept traffic intended for the destination (i.e., they behave as gateways). See https://superuser.com/questions/311849/how-can-i-ping-via-an-alternate-gateway
In this situation, I'd just use SSH:
ssh... | Is it possible to check the connectivity between 2 linux machines by pinging from a third machine? |
1,533,307,609,000 |
I am looking for a way to get total disk access of a program, ideally something like time(.) command that reports back disk read/write of the program.
|
I found the solution:
/usr/bin/time -v program args
will return number of blocks read and written to disk by the rpogram.
| How to measure IO/disk usage of a program |
1,533,307,609,000 |
I found that vmstat gives:
si: Amount of memory swapped in from disk (/s)
so: Amount of memory swapped to disk (/s)
(and here I understand that swapping and paging are being used interchangeably)
Is it possible to get those statistics for a specific process?
|
The simple answer is you can't. Writing and reading to swap is done by kswapd.
There already was answer how it is [generally operates][1] - https://serverfault.com/a/316636/252390
If you wan't to reduce value of Swap IN/Out you may check vm.swappiness sysctl param.
sysctl vm.swappiness
You may set lower value to decr... | How to monitor paging activity per process? |
1,533,307,609,000 |
If you run vmstat -s, it displays statistics about your system. I am wondering what it does to calculate the used memory statistic (highlighted below). This is not a statistic that I can find in /proc/meminfo.
user@machine:# vmstat -s
7483816 K total memory
**4740624 K used memory**
3619096 K activ... |
vmstat gets the virtual memory stat from /proc/meminfo and /proc/vmstat, and processor related info from /proc/stat:
% strace -fe open vmstat -s
...
open("/proc/meminfo", O_RDONLY) = 3
open("/proc/stat", O_RDONLY) = 4
open("/proc/vmstat", O_RDONLY) = 5
...
For used memory, from https://gi... | Where does vmstat get it's "used memory" statistic from? |
1,533,307,609,000 |
Just upgraded a cacti server to Stretch/Debian 9. Cacti was still working after the upgrade was finished.
After cleaning up the leftover Debian 8 PHP 5 packages, that left only PHP 7.0 installed, cacti stopped working, giving only a blank page when accessing the URL.
Calling /usr/share/cacti/site/index.php from the co... |
mysql_pconnect is obsolete by now, and not supported by PHP 7.0.
Changed the database_type in the cacti configuration file /etc/cacti/debian.php as in:
From:
$database_type = "mysql";
to:
$database_type = "mysqli";
Cacti is now working.
From: http://php.net/manual/en/function.mysql-pconnect.php
This extension was d... | Cacti stopped working after upgrade to Stretch |
1,533,307,609,000 |
Are there any methods or bash tools that can observe some events (such as creating a folder) and then do another actions?
|
What you are looking for is inotify, there are programs inotifywait and inotifywatch, in package inotify-tools.
You can add event handlers to creates, reads, writes, deletes, etc.
To install: sudo apt-get install inotify-tools
see also package inotify-hookable
| Event dispatcher in bash (Ubuntu Gnu/Linux) [duplicate] |
1,533,307,609,000 |
This might be a shot in the dark, but I am wondering if there is a way that I can connect my system monitor on my computer to my headless box. It would be awesome to somehow use that interface display what is going on on my server, from my Desktop.
I am of course aware of tools like top and other web based monitors t... |
What is so awesome on gnome-system-monitor? I don't know about any way to do that, but feel free to hack it. It is open source.
This application is just "desktop toy". It does not have ambitions to monitor different hosts. If you are interested in monitoring server, there are different tools that do that and do that i... | Connect gnome-system-monitor to another (headless) machine |
1,533,307,609,000 |
I am using CentOS 6.5 and Xen 4.2.4-30
xentop does not change MEM(%) at all.
NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR VBD_RSECT VBD_WSECT SSID
Domain-0 -----r 68 0.0 1048568 25.0 1048576 25.0 ... |
I'm not familiar with Xen (ie. I have no practical experience with it) but I did find this thread which would seem to indicate that you can never get the "actual" memory utilizations from the guest VMs from Dom0 via xentop.
Monitoring domU real memory usage
There is this comment at the end of the thread:
This info... | xentop gives static info about memory usage |
1,533,307,609,000 |
Trying to setup memory usage monitoring for Nagios using the check_snmp_mem.pl from Nagios SNMP plugin.
I could not even get it working from the command line, I mean I go to /usr/lib/nagios/plugins and run the script, it gets a "No response from remote host" error.
[root@nagios plugins]# ./check_snmp_mem.pl -H rhel01 ... |
With help from another colleague, we worked out why it didn't work.
3 things:
First, we have agentaddress tcp:x.x.x.x:161 in snmpd.conf, just deleted the line
Second, iptables is blocking udp port 161, added rules to allow udp port 161
Third, something wrong with the script as you can see the error message about line... | No response from remote host for Nagios check_snmp_mem.pl plugin |
1,533,307,609,000 |
Here is what I currently have online, as you can see there is no information about my debian server.
(While was installing I tried to follow next instructions)
What I have changed in default gmond.conf:
cluster {
name = "dspproc"
owner = "unspecified"
latlong = "unspecified"
url = "dspproc"
}
udp_send_channe... |
I seem to remember having a similar problem when setting up Ganglia many moons ago. This may not be the same issue, but for me it was that my box/network didn't like Ganglia's multicasting. Once I set it up to use unicasting, all was well.
From the Ganglia docs:
If only a host and port are specified then gmond will s... | How to configurate ganglia-monitor on a single debian machine? |
1,533,307,609,000 |
Is there a way to find out what is trying to mount this file?
Jul 13 14:27:24 myhost automount[13527]: lookup(file): lookup for
tmp_dir failed
Something is looking for "tmp_dir", and I've grepped a bunch of places but cannot find what script, program, etc... is looking for the file/dir and is causing automount to ... |
Here are a couple of ways to monitor accesses to particular files. I'm not completely sure how they'll interact with an automounter, but they probably will work.
Put a LoggedFS filesystem on the automount directory (/amnt or whatever), and configure it to look out for /amnt/tmp_dir. Start from the provided configurat... | Automount lookup failed. How to determine what is trying to access the file? |
1,533,307,609,000 |
runsvdir: UNIX init scheme with service supervision from runit is a nice tool to re-run some service(s) if it dies. It monitor a directory for changes, inotify like. It execute scripts in directories forever.
I have a structure like this:
$ tree app
app
├── service
│ ├── run
│ └── supervise
├── replay
│ ├── run
... |
Fixed like this after docker build .:
docker exec -d -u mevatlave cont screen -d -m -S run ./run
docker exec -d -u mevatlave cont screen -d -m -S replay ./replay.sh
docker exec -it -u mevatlave cont screen -x run
| How to spawn a user screen in a docker container? |
1,533,307,609,000 |
I found an interesting article that describes how to simulate network issues (like lost packets) on a linux server.
On an Ubuntu test VM, I checked which interface is used for internet connectivity, and it's called ens33.
Then I added a rule using tc to introduce packet loss:
$ sudo tc qdisc add dev ens33 root netem l... |
tc also accepts a -s parameter, with the same meaning: statistics.
Example as root applied on a veth link toward an LXC container with address 10.0.3.128:
# echo; tc qdisc del dev vethlzYQu1 root 2>/dev/null; \
ip neigh flush all; \
tc qdisc add dev vethlzYQu1 root netem loss 30% 50%; \
tc -s qdisc show dev veth... | Monitoring packet loss simulated with tc |
1,533,307,609,000 |
For a while now and for some reason I find myself in the unpleasant situation of Ctrl-w not working anymore in any program, which means I need the mouse any time I want to close a tab.
I tried checking general Debian keyboard shortcuts, input method shortcuts etc. but didn't find any conflict so far. However, it's not... |
I did not find the answer to my question, but I did find a simple solution to my problem. Instead of using Ctrl-w to close tabs, I now simply use Alt-f-c. Admitted, it's one key more to press, but it also allows me to close tabs with one hand from my keyboard. It also helped me realize that preconfigured Menu shortcut... | How to track all shortcut keys pressed and the process they interact with? |
1,533,307,609,000 |
Some files on a Debian 9 server periodically overwritten to the original status after I modified it. I couldn't find what process/program is doing that job. Nothing is defined on crontab. Posibilly from a remote server (i.e. Ansible/Puppet) but I cound't find evidence.
I tried to use lsof and fuser but no process is u... |
Good question! Intrusion Detection Systems are used for things like this or at least they could be so maybe one of those (aide, tripwire, ...) already has such capability or one could ask about it there.
If you know the files being modified beforehand (or a list of files which are important to remain unmodified and th... | How to Monitor what Changes a File |
1,603,985,792,000 |
My home server runs a couple of shell scripts regularly for maintenance tasks - mostly backup, but also other stuff. I would like to be alerted in case anything fails but also keep a log of when it works.
Currently my setup looks like this:
Cron calls one shell script which calls other scripts (just so the one won'... |
I have implemented the following:
Enabled output to stdout for various steps or added custom output, e.g.:
echo "Starting backup..."
rsync whatever && echo "Backup successful" || echo "Backup failed"
Checking the return codes of each step of the script, either exiting the sub-script immediately or continuing, retu... | How to monitor cron maintenance scripts? |
1,603,985,792,000 |
OK, I've been googling for hours so I obviously have not been able to understand the answers to the various questions that have already been asked about this subject. I am hoping that, by asking the question again in a more specific way, I will be able to get an answer I can understand.
I have some application runnin... |
I have answered my own question: I found another utility that better provides what I want:
https://github.com/geoffmeyers/interceptty
That package includes a perl script that post-processes the output of interceptty to provide a "pretty" output. I found it quite easy to modify the script to add a timestamp to each ... | How do I use jpnevulator to capture and log the serial traffic between an application and hardware serial port? |
1,603,985,792,000 |
Sorry if this is a repeat. I searched, but with no luck.
I'm using SNMPd on an openwrt/wr host with some ppp and tun connections. These connections get IDs in the if table, and will actually get a new ID whenever the tunnels reconnect.
Nagios (check_mk), when that happens, complains that an interface went down; oh, a... |
I figured it out, so here's an answer so I'm not denvercoder9.
Adding a new config to the snmpd.conf seems to have both trimmed the interface march as well as prevented complaints.
interface_replace_old yes
I think that's the one. It could be that simple.
Try it yourself if you run into the same problem, and let me ... | Nagios/SNMP - devices alerting when ppp/tun connections cycle |
1,603,985,792,000 |
On the server for everyday there will be a file with name "xxxx_xxx_2016-11-08_0.log" on the lcoation /usr/logs the date changes every day in the file name but format is same, there is one file per day, the file content is written once in every 4 hours. It writes file content at 12 AM, 4AM, 8AM, 12 PM, 4 PM, 8 PM. A m... |
This is just a sample script that you could use to modify as per your needs.
FILE="xxxx_xxx_`date +"%Y-%m-%d"`_0.log"
grep -E "maxretry|not synchronized|FCS Bad receipt" $FILE > fcs_error.log
if [[ $(wc -l fcs_error.log | awk '{print $1}') -gt 0 ]]; then
mail -s "error found" mail_id <fcs_error.log
fi
Chek cron... | Fcs synchronization error monitoring |
1,603,985,792,000 |
I have set up a very simple script so that I can test whether a process is running or not and if so then it will touch a file and everything will be fine. However if process is not running and file isn't touched then I want to be able to set up an alert.
pgrep "sleep" >/dev/null && touch monitor.log
This script is ru... |
This is a straightforward file modification time check; the complications mainly arise from the possibility of up to 86,400 alerts per day (usually over a long holiday weekend is when these sorts of thing break), and additional complications of whether or not the modification time checker (or cron, or the system...) a... | Creating alert notification if process stops touching file |
1,603,985,792,000 |
I have just attempted to get RICHPse version 3.4 running on a Solaris version 10 Sun M5000.
It seems to run on the global zone but not on the local zones.
On the local zones RICHPse just fails without issuing any errors.
I have run orca + RICHPse without root access and it seems to run fine on other servers without r... |
Commenting or removing the line:
#define USE_RAWDISK 1
in lib/orcallator.se seems to have fixed the problem for me.
| Does orca + RICHPse work on Solaris Containers or local zones? |
1,603,985,792,000 |
I need to monitor HP printer state (ink, paper, etc). Hplip has hp-info tool with debug-mode and very verbose output. But I can't find any documentation with explanation of its data. For example:
hp-info[31896]: debug: printer_status=1
hp-info[31896]: debug: device_status=2
hp-info[31896]: debug: cover_status=4
hp-inf... |
There is no complete documentation for hp-info command. All that you
can find is in hp-info - -help (or) man hp-info command. HPLIP is a
open source project and you can find the complete source code of hplip
@ http://hplipopensource.com/hplip-web/gethplip.html. You can explore
through the source code to get m... | Where can I find hplip debug documentation? |
1,359,274,529,000 |
I am about to develop a piece of software and I want to ascertain the impact it has on my system. The main things I am look for are load times, memory and CPU usage and shutdown time, although I would like to get as much information as possible. I know I can use my distro's system monitor to get some of this stuff, bu... |
It's looking that you need software profilers eg:
for memory I use valgrind massif with linuxtools on eclipse.
If you are not restricted by system/gpl try dtrace on solaris/sunos if not try systemtap(eclipse + linuxtools) or gprof if you have source code.
| How can I test the system footprint of applications? |
1,359,274,529,000 |
I'm looking for a process monitor that produce an easy to parse output to stdout. Is there any tool like that in unix? Something like htop or top, but mean to be consumed by another program.
To be more specific, let's say i want to create a gui program for process monitoring. So, I need to get a real time process info... |
Sounds like ps... It can be configured to output specific information on specific processes (or all processes).
If you don’t mind making your program OS-specific, you could also parse whatever ps parses on your system, e.g. /proc on a Linux system.
| Is there any parseable process monitor? |
1,359,274,529,000 |
Munin has chart 'interrupts and context switches on the system'.
As far as this is a monitoring tool I assume these values are important for the server performance.
So, the question is: how can I know for each particular server the values are OK or too high?
I assume any Linux at least
|
Monitor the trends over time and look for anomalies. The "normal" values differ depending on the type of application load and in turn, what the application does on a regular basis.
| How many interrupts and context switches good for the server? |
1,359,274,529,000 |
I know how to use inotify to monitor filesystem events under linux. I'm wondering if there is any utility that is similar to inotify which can be used to monitor non-filesystem events.
For example, I'd like to register event handlers which can be triggered by things like the startup or shutdown of certain executables,... |
I believe that you can do at least some of what you're looking for With Sysdig Chisels. Sysdig is an open-source tool that enables you to monitor Linux system calls. The chisels enable you to write scripts to perform actions based on the observed system calls.
Take a look at the user guide
| Monitoring non-filesystem events similarly to inotify? |
1,359,274,529,000 |
I have installed XYMon server successfully, but I can't get the client information to show. It took me a while to figure out, but if you add a host to the server that doesn't have the client, it still shows some things like conn/ssh/info, but nothing like cpu/disk/mem.
I have found it to be REALLY hard to find any goo... |
Based on This page from XYMon regarding Clients not reporting I figured it out. While it gives the problem, I couldn't get the solutions there to work.
On Client :
cat /etc/default/xymon-client | grep CLIENTHOSTNAME
Must Match on Server :
/etc/xymon/hosts.cfg
1.2.3.4 CLIENTHOSTNAME
If it doesn't match EXACTLY then... | XYMon-Client status not showing in XYMon Server |
1,359,274,529,000 |
I have nagios client which gave sudden error after an upgrade. I reinstalled nagios-plugin and nrpe agent again but unable solve error. This version uses nrpe under xinetd.
# /usr/local/nagios/libexec/check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
# netstat -plan | grep :5666
tcp ... |
NRPE hasn't been updated in a few years (September 2013), this is what it does on the server side
SSL_library_init();
SSLeay_add_ssl_algorithms();
meth=SSLv23_server_method();
...
SSL_CTX_set_options(ctx,SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
...
SL_CTX_set_cipher_list(ctx,"ADH");
dh=get_dh512();
and the client (check_n... | nagios SSL handshake |
1,359,274,529,000 |
I remember long time ago I had some antivirus on windows which had wile accesses monitor, and could tell you if any process accesses a file.I need to monitor every file in my home folder(or any other) what application does the actions.
|
If you are using Linux, this sounds like a job for fatrace (which uses the fanotify API). Here is some sample output:
sh(28980): C /bin/bash
cron(28974): CW /tmp/tmpf807Y78 (deleted)
cron(28974): C /lib/x86_64-linux-gnu/security/pam_unix.so
cron(28974): C /lib/x86_64-linux-gnu/libcrypt-2.13.so
cron(28974): C /lib/x86_... | file creation and acces monitoring app [duplicate] |
1,359,274,529,000 |
Ok, so I want to monitoring running programs on Debian. For example I have a running several program on my instance and I can get output of netstat -plnt and see what is program and their ports. Example:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 65/sshd
tcp 0 0 0.0.0.0... |
#! /bin/bash
while :; do
running=$(netstat -plnt)
if [ "$running" != "$newrunning" -a -n "$firstrun" ]; then
diff -u <(echo "$newrunning") <(echo "$running") | mail -s "New listeners!" [email protected]
fi
newrunning=$(netstat -plnt)
firstrun=1
sleep 1
done
This script (must be run u... | How to monitor running programs with open ports? |
1,359,274,529,000 |
So I'm pretty new to Linux and I really can't figure it how to.
So I wanted to make a useful output for our monitoring Tool with speedtest-cli. We have to monitor download and upload speeds for multiple locations.
I made following script that breaks the output with awk and gives me the desired number (in this case onl... |
Since you explicitly use gawk, you can use the match() function to look for the pattern "Download: number Mbit/s" and extract the actual value of that pattern found in your string as follows:
gawk '{if (match($0,/Download: ([[:digit:]]+\.[[:digit:]]+) Mbit\/s/,a)>0) print a[1]}'
This will
determine if the pattern wa... | Speedtest-CLI output for monitoring |
1,359,274,529,000 |
What is the meaning of this error?
[root@db2 zabbix]# zabbix_sender -z zabbix -s zabbix -k mysql[Threads_running] -o 100 -vv
zabbix_sender [55944]: DEBUG: answer [{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000015"}]
info from server: "processed: 0; failed: 1; total... |
This error means that server did not accept the value. Common reasons:
incorrect hostname
incorrect item key
item not in the server configuration cache yet
Note that hostnames and item keys are case sensitive.
| zabbix_sender error |
1,359,274,529,000 |
I am looking for some solution to remove or list all movies that are dowloaded on our network storage. We are running short on free space and I noticed that a lot of people started downloading movies and music and then store it on network drive. Is there any better solution than writing a script that will run in cron... |
The best solutions are to either:
Upgrade your storage so you have more space.
or:
Talk to people and get them to quit putting things on the disk and not deleting them.
or, if 1 is not an option and 2 fails:
Set up usage quotas for everyone, and enforce them. THis will require everyone to authenticate as themse... | How to monitor/remove dowloaded movies and music from network storage? [closed] |
1,359,274,529,000 |
As part of smooth functioning on my application I want to check a count of a particular process and send a email to multiple people if it exceeds certain limit.I have written script for counting process but I dont know for the email part.
Code for processes count
#!/bin/sh
NOP=`ps -ef | grep -I nagios.cfg | grep -v gr... |
mail command is pretty simple:
echo "More parent processes are running on the server" | mail -s "subject" [email protected] [email protected]
And your script can be optimized to one line:
[ "$(pgrep -c nagios.cfg)" -gt 2 ] && echo "More parent processes are running on the server" | mail -s "subject" [email protected]... | Count the number of processes and send a email to multiple people if it exceeds certain limit |
1,359,274,529,000 |
I am new to SNMP and I can not find any clear article if we can add a data node in SNMP. And also how does SNMP collect data?
I want to monitor the following resources, which can be obtained from SAR report. So, please tell me how to add this under SNMP or at least how does SNMP collect data, so that I will try to fi... |
The Net-SNMP package supplied with RedHat is actually a very flexible monitoring agent, which will get values for all of the metrics you listed by default out of the box. However, it's old: the SNMP protocol itself has been around for over two decades, with significant improvements made over that span. The learning cu... | How to use SNMP to get any information that we need in Redhat? |
1,359,274,529,000 |
I want to monitor PHP-FPM in Zabbix. Tell me, please, how to do it?
Are there any templates to try it ?
|
There are some, like https://github.com/jizhang/zabbix-templates/tree/master/php-fpm .
Looking at https://github.com/jizhang/zabbix-templates/blob/master/php-fpm/php-fpm-check.sh , it parses the status page. In case of errors, arbitrary negative values are used.
| How to monitor PHP-FPM in zabbix? |
1,359,274,529,000 |
So, I found that nload and iftop displays the amount of data that passed and how fast. Now, is there anything like those that can save/load statistics?
I want to measure the amount of data I download over a month/year. Suggestions will really help.
Thanks!
|
File "/proc/net/dev" has information about trannsmited and recieved packages for every interface your computer has. I guess you could make a script to time the packages and get the bandwith since you have data in its raw form.
| Historical bandwidth data in a console? (save/load statistics) |
1,359,274,529,000 |
I have couple of machines as shown below which are running Ubuntu 12.04 and I need to find out the process name along with its pid whose CPU usage is greater than 70%.
Below are the machines as an example -
machineA
machineB
machineC
machineD
I need to have my shell script which can run periodically every 15 minutes ... |
You should probably try to use an already existing monitoring solution for this. This is pretty much exactly what they're designed to do, monitor for conditions and send out alerts (SMS or email). You might want to check out nagios or zabbix for a free monitoring solution.
I haven't used it but it looks like Cacti su... | How to monitor bunch of machines for CPU usage from another machine? |
1,359,274,529,000 |
I have written a script to check if our three URLs are up.And if they are down I will need to send a message stating the url's are down and not active.
The problem is, I did something wrong and now in any scenarios my output always shows the "URLs are up"
FYi.. we use nginx and and hence why i has grep the output f... |
Give this a try.
#!/bin/bash
for URL in <url1> <url2> <url3>
do
STATUS=$(curl -s -o /dev/null -w "%{http_code}\n" $URL)
if [ $STATUS == 302 ] ; then
echo "$URL is up, returned $STATUS"
else
echo "$URL is not up, returned $... | script to check if the URL are up and running [closed] |
1,359,274,529,000 |
I wonder is it possible to run ganglias gmetad and ganglia-monitor not demonized, under my own user (me, sudo) on debian? Because while gmond.conf contains something like demonize option I see no such in gmetad.conf...
|
Looking at man gmetad, you'll probably find
-d, --debug=INT
Debug level. If greater than zero, daemon will stay in foreground. (default='0')
so using commandline argument, e.g. gmetad -d 1, should do the trick.
| Is it possible to run ganglias gmetad and ganglia-monitor not demonized on debian? |
1,359,274,529,000 |
The psad monitoring tool keeps on sending lots of mail to my localhost admin account. I use my ubuntu server as a NAT router, and psad warned me to enable logging in iptables. After I did so, it sarted filling my mailbox with loads of messages. Within few days the size of mail box has grown to 3.4 GB.
How can I comple... |
Please see the documentation: http://cipherdyne.org/psad/docs/config.html
You could set 'EMAIL_ADDRESSES' to a blackhole address (eg a receive address that just discards what it gets), or consider tuning the following:
'EMAIL_ALERT_DANGER_LEVEL'
'PSAD_EMAIL_LIMIT'
'EMAIL_LIMIT_STATUS_MSG'
Those are described in the UR... | Turning off mailing in psad |
1,359,274,529,000 |
I'm facing an issue with my MT7601U network adapter on Linux. Although I've successfully entered monitor mode, I'm encountering difficulties capturing handshakes and discovering devices in the network/s. Strangely, only WPS attacks seem to work reliably.
Here are the key details:
Adapter: Ralink MT7601U
Distribution:... |
I solved it by running the following commands sudo airmon-ng check kill
Before using sudo airmon-ng start <NETWORK INTERFACE>
everything works great and I finally can enjoy my new wifi adapter.
Thanks for anyone who was concerned ♥️
If anybody have explanation for it it will be great!
| MT7601U Adapter in Linux - Monitor Mode Enabled, but Unable to Capture Handshake or Discover Devices |
1,359,274,529,000 |
I once had this package called specto, that would monitor a website for changes. Now, it seems to be missing in Debian 11:
▶sudo apt install specto
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package specto
I'm curious why it is no longer availa... |
It’s no longer available because it depends on the obsolete gnome-python library (and more generally, the obsolete Python 2 ecosystem); it was removed from Debian in January 2018 and isn’t available in either Debian 10 or Debian 11. This is actually a long time after Specto’s own author declared it obsolete, in March ... | Specto Missing from Debian 11 |
1,655,405,075,000 |
OS: Ubuntu 22.04 LTS.
Many posts deal with file monitoring. One in particular is of interest and based on inotifywait, but I don't know how to modify it for my purpose.
Objective: to monitor $HOME/{Documents/,Downloads/,Archive/} for link files *.lnk as they are created. Those files are created every time I use Word i... |
You need to write this small script in a file using your terminal. I assume you are using the bash shell since you are beginning, and on Ubuntu. Let us know if it is otherwise.
$ touch notify_links
$ chmod u+x notify_links
$ cat notify_script
#!/usr/bin/env bash
inotifywait -mr -e moved_to,create "$HOME"/{Documents,Do... | Monitor several directories for specific files' creation, every 10s |
1,655,405,075,000 |
I have a process that gets sizes for all disks on server, writes it into a file like this
# cat disksize
DISK# ACTUAL WARNING CRITICAL
disk1 12 20 30
disk2 45 60 75
first row of file is for reference, showing what each column is for. Below is monitoring script, but I'm not sure if it will work for n... |
Your script (as written) will not do what you expect. The biggest problem is that you could exit 0 prematurely from the loop, missing possible Critical disk entries that follow. Less dangerously, the script could exit 1 with a Warning when Critical problems exist. Nagios will base the status of this check on the exit ... | Is it alright to add a disk size monitoring script for NAGIOS, using loop? |
1,655,405,075,000 |
I would like to modify iptables after VPN connection. What is the best approach to achieve that ?
I already tried through systemd with a custom unit in NetworkManager dispatcher.d directory but it seems to only work at boot, not if VPN is stopped and restarted - if I wrote it right :
[Unit]
Description=iptables setup
... |
Does /usr/bin/nordvpn return immediately after it is called or does it return after completing the VPN connection?
In the latter case, just rename /usr/bin/nordvpn to /usr/bin/nordvpn.original and create a script /usr/bin/nordvpn that first calls /usr/bin/nordvpn.original and then /usr/local/bin/setup_iptables.sh (thi... | run a script after a binary was called |
1,655,405,075,000 |
I am getting SSL Handshake errors with NRPE after enabling SSL. It worked perfectly fine without SSL doing check_nrpe. The allowed host is correct and when run without SSL enabled it shows the proper version. Both are running 4.3 on CentOS Linux release 7.9.2009 (Core) I did not compile NRPE or nagios from source I in... |
I'm assuming the nrpe.cfg is from the node being called up (10.1.1.125) and if that's the case, as Steffen said above, you have configured it to require a certificate from anyone calling it. Presumably this should be included when you run check_nrpe, and looking at the help text for 4.0.3 (which is the one I have) the... | NRPE Could not complete SSL handshake - Peer did not return a ceritificate |
1,655,405,075,000 |
I am using Linux Mint 20.
% inxi -S
System: Host: ismail-i5 Kernel: 5.4.0-56-generic x86_64 bits: 64 Desktop: Cinnamon 4.6.7 Distro: Linux Mint 20 Ulyana
I have 3 HDD and 1 SSD.
% lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 ... |
Is there any solution which I can use to have a warning when my storage devices start having problems.
There are two types of people in the world: those who make backups, and those who haven't started making backups.
Jokes aside, HDDs often die abruptly due to mechanical failures with no advance warnings or info but... | early warning for HDD issues |
1,655,405,075,000 |
In my scenario, my host has a network interface with multiple IP addresses. I want to get the traffic of every IP address. I want to get received and sent packets and bytes, and error packets. My interface is:
qg-6108c4a2-94@if209: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 10... |
You won't be able to get the information you want. The IPs are part of the same single interface, and as such, they are only counted at the physical level. I should note that "ifconfig" is insufficient and obsolete. The ip command will show you the summary at the physical level.
% ip -s link show br1000
10: br1000: <B... | How in Linux can I get traffic of every ip address on a single interface, with multiple IP addresses? |
1,655,405,075,000 |
In a presentation, I saw a command line tool mentioned that is able to record the running services (and the listening ports opened by them) as a baseline and later check against that baseline and report deviations.
Unfortunately, I don't remember the name of the tool, just, that it was written in Go (IIRC). Somehow I ... |
The name of the tool is goss!
From its README:
What is Goss?
Goss is a YAML based serverspec alternative tool for validating a server’s configuration. It eases the process of writing tests by allowing the user to generate tests from the current system state. Once the test suite is written they can be executed, waited... | Record and later check running services |
1,655,405,075,000 |
If I'm using SSH to remote into a machine and I'm running a command like: sudo iptables -L -v -n how do I get a packet hit count that excludes the packet traffic I'm creating by using SSH?
I mean I could just avoid that by logging in to the machine directly, but I doubt that is always the case...or do I just have to a... |
Your best bet is to add a separate rule for your SSH connections, so that they do not mix with the other flows. Something like this:
-A INPUT -s <your client IP address> -p tcp --dport 22 -j ACCEPT
You can also remove the IP address match if you want to separate all SSH traffic, add a match for a particular interface... | Hide / ignore the packets you are creating in iptables firewall when connected with ssh into a Linux machine? |
1,655,405,075,000 |
I'm looking for a monitoring service which look for suspicious writing on disk.
Let's say that I have a PHP/Ruby/Python website running on my server, and there is a vulnerability on my website. An attacker can upload/modify any file owned by the apache/nginx user.
Is there any service that can say : "Hey a modificat... |
Set up a regular backup scheme to another machine over the network via ssh using rsync to replicate the file tree(s) of interest. Run it with a listing of changes. Keep that listing in a dated filename on the target machine. The first time would list all the files. Scan the listings after that for what has changed... | Monitoring suspicions writing on disk |
1,655,405,075,000 |
Is it possible to have a automatic screenshot capture of Zabbix CPU & Memory Graph
Is there any 3rd party tool which can be implemented with Zabbix for capturing the screenshot.
As a status mail it should be delivered via On daily bases morning and evening 8.00 clock
My exact aim is to collect daily status from Zab... |
Images (which are plain PNG) can be grabbed with scripts - and there are scripts that do so. You finish your question with "instead of creating any script", but I assume that a script that collects data from Zabbix (instead of doing its own data collection) would be acceptable. A couple of community efforts to generat... | Automatically screenshot capture of Zabbix |
1,655,405,075,000 |
I have 2 servers behind NAT, both have same public IP and NRPE is listening on non-standard ports.
I would like to monitor them both using my central icinga server, but I can't find where can I specify alternative nrpe port, icinga is trying default port which isn't open on target public IP. How can I do that?
|
Note that I assume that your NAT-ing device is already configured forwarding traffic to your NRPE servers. And that you are running Icinga 1.
On your Icinga server, you probably have some /etc/nagios-plugins/config/check_nrpe.cfg file existing, that gets loaded by your Icinga daemon. When you define a check_nrpe che... | How to specify nrpe port in icinga / nagios |
1,655,405,075,000 |
My goal was to add a box between two routers I have so that I can monitor and analyze network traffic, use it as a syslog server for both routers, and mail alerts when appropriate. Although using an old repeater hub would most likely accomplish what I want easier, I've not been able to find one for purchase.
Based on... |
First, you don't set eth0 & eth1 to 0.0.0.0, you instead do not assign an IP address at all. (But maybe your 0.0.0.0 is treated as no IP, not sure—never tried). You then assign an IP address to the bridge.
# ip addr ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
⋮
2: eth0: ... | Using a Linux box in a bridge or router configuration for network/securing monitoring and analysis |
1,655,405,075,000 |
I am trying to create a daemon to monitor a users's bash_history file for manual modifications. In other words, if a user opens the file and modifies it, the daemon will notify this action for safety measures, but when the history updates itself, nothing happens.
The solution I tried is using inotifywait:
while true; ... |
That is not possible with inotify. There is no configuration that could probe if a file is altered by an user or a process, neither if it will monitor only "append to files".
And EVEN if there exists one "append to file" inotify event, one user could inject bash_history data with echo >> creating bogus entries and lo... | How do I monitor bash_history file for manual modifications? |
1,655,405,075,000 |
This is a script in bash. Here
Which capture a string "ERROR: your TCP- connection is dead."
from a Live dynamic log file. Here the name of a log file "TcpRcpt.log"
which contain sample of a log data below.
SAT Mar 26 19:55:37 2016 TCPRcpt-0297--ERROR: your TCP- connection is dead.
SAT Mar 26 19:55:37 2016 TCPRcp... |
'It always gives 0 value' because that's the exit code of the last command in the pipeline - sed, which succeed (returns 0) even when no replace happens.
Setting pipefail option will make the result of the pipe set to the result of the first failed command in the pipeline, if any. Modify your script by setting that ... | Capture specific string and send notification every time |
1,655,405,075,000 |
One of my site was infested with malware once and since then I am seeing every alternate day the header.php files are getting reverted back to older versions (possibly by a script) and a malicious script is inserted somewhere in the file:
<script>var a=''; setTimeout(10); var default_keyword = encodeURIComponent(docum... |
To start with, make sure your .php and .html files are NOT writable by the uid that the web server runs as. The web server needs read and execute permissions on the files and directories but (with possibly a few exceptions like upload directories) it does not need write access to the data it is supposed to be serving... | Files getting reverted to older version |
1,655,405,075,000 |
I'm writing a program that tracks user activities, and basically tries to automate things that can be.
I'm currently trying to monitor programs that user uses often from command line. But just knowing is not enough, I need data along the lines of when such command were executed, working directory etc.
My current solut... |
Did you look at auditd? If not see this slideshow about Linux audit system. It does provide most of the facilities that you are describing and in a much more standard and fool proof way.
http://people.redhat.com/sgrubb/audit/audit_ids_2011.pdf
| How can I track commands executed in a terminal ( without bash_history ) |
1,655,405,075,000 |
I need a network analysis tool that can find if there are some issues regarding:
packet transmission
sessions
any other stuff is welcome.
I'm connected to the appliance I need to check with a cross cable, so I have to check the traffic client-side. It would be great if it could have a gui and/or multiplatform.
|
Wireshark might be what you're looking for. To analyse packet loss you should isolate the session/stream and append "and tcp.analysis.lost_segment" to the automatically generated filter. If you see packets there then it's likely there's packet loss.
| What tool to use to monitor network issues? [closed] |
1,655,405,075,000 |
Does IPTraf includes its own activity in the report? If it does how do I exclude it?
|
I don't believe that tools such as IPTraf introduce any of their own activity in the way that you think that would warrant it needing to exclude it.
In general most of these types of tools make use of a mode that network devices provide called Promiscuous Mode. This mode allows applications to essentially see every pa... | Does IPTraf includes its own activity in the report? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.