How to Implement Nagios Topography to avoid over-alerting. Also how can we improve nagios performance to get avoided from fake alerts. Answer You can use host and service dependency definition in your configs. For example: dependent_service_description CPU Load These are the service that are dependent on the …
Tag: linux
C NET-SNMP Get and Set specifically via MIB Name, Not OID
I have written and am testing software for a generic SNMP client module in C as well as an implementation using this generic module. I am having trouble getting a get request to work by passing in a MIB name(e.g. sysDescr) instead of an OID(e.g. 1.3.6.1.2.1.1.1). I am successful when I pass in a character arr…
Static-storage-duration object uniquness guaranties when dynamically loaded from multiple libraries
Imagine that there is a shared library S, there are shared libraries A and B, and an executable C. A and B are linked against S. C is not linked against A and B, instead C dynamically loads A and B via dlopen. S has a static-storage-duration object O with external linkage that is used inside A and B. I
Linux Hadoop Services monitoring tool and restart if down
I have configured Hadoop 2.7.5 with Hbase. It is a 5 system cluster in fully distributed mode. I have to monitor Hadoop/Hbase daemons and want to start some action (e.g. mail ) if some daemon goes down. Is there any built-in solution. Also I want to start Hadoop at boot time. How can I do this ? Answer I am
how to choose chunk size when reading a large file?
I know that reading a file with chunk size that is multiple of filesystem block size is better. 1) Why is that the case? I mean lets say block size is 8kb and I read 9kb. This means that it has to go and get 12kb and then get rid of the other extra 3kb. Yes it did go and
redirect and print script output using for loop and awk in linux
I have a script which give out put like this : my_script <variables> output like this : now I want to redirect the output and print like this print “some_text col_3@col_4 some_more_text col_4” ans will be like this: some_text textext3@texxt6 some_more_text texxt6 some_text textext1@text4 som…
How to dynamically check for library information in posix compliant systems in C++?
I am playing around with Linux to learn some things about operating systems. Currently I want to query the OS for the version of certain libraries (GLFW and GLEW on particular). I want to print the current version or a message if the library is not installed. Is there a general way to query the OS for the ver…
How to limit a search of a directory with “find” command?
I am trying to make a Bash script that would create symlinks to directories that have a “target” subdirectory. I use “find” command to search for the “target” directories and put the filepaths to array. The array is looped through and symbolic links are made to directories.…
How can I push only the files in current index?
I have many large binary files with source code under git version control. I want to only push the source files to github for repo initialization. So I used git rm -r –cached to remove the large binary files from the index. After checking git ls-tree -r –names-only mybranch, I confirmed there are …
Return the ls -l output in docker container
So I have a docker container running which has a couple of folder/files inside. When I go inside the container I can see that they are: hostmachine$> docker exec -it testContainer bash testContainer@testContainer:~$ ls -l My question is: What script, how can I use it on my hostmachine that will: 1) Echo ba…