Difference between pages "Conversion" and "Snmp"

From Linuxintro
(Difference between pages)
imported>ThorstenStaerk
(extract mpg from .bin)
 
imported>ThorstenStaerk
 
Line 1: Line 1:
= Images =
+
Trying to build an SNMP prototype
== convert image formats ==
 
Use the command convert like this:
 
convert ''name''.''format'' ''name''.''jpg''
 
  
= Music files =
+
SUSE Linux:
== k3b cannot convert music files? ==
 
install "libk3b2-mp3"
 
  
= Videos =
+
yast -i nagios apache2
== convert video to 3gp ==
+
/etc/init.d/nagios start
  mencoder ''INPUTFILE'' -nosound -ovc lavc -lavcopts vcodec=mpeg4 -vop expand=176:144,scale=176:-2 -o movie.avi -ofps 12
+
  /etc/init.d/apache2 start
  
mplayer -vo null -ao pcm -af resample=8000,volume=+4db:sc ''INPUTFILE''
+
Remember your login nagiosadmin:nagiosadmin and point your browser to http://127.0.0.1/nagios
  
  ffmpeg -i movie.avi -i audiodump.wav -b 48 -ac 1 -ab 12 -map 0.0 -map 1.0 ''OUTPUTFILE''
+
  /etc/init.d/snmptrapd
 +
tail -f /var/log/net-snmpd.log
 +
snmptrap -v 2c -c public localhost "" NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 42
  
== convert 3gp-Video to DivX ==
+
  No access configuration - dropping trap.
  mencoder -ovc divx4 vid.3gp -o vid.avi
 
  
== convert video for Palm ==
+
So it seems I have to
mencoder source.mpg -ofps 15 -srate 24000 -oac mp3lame -lameopts
 
cbr:br=32:vol=5:mode=3 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=96:vhq:
 
keyint=300 -vop scale=480:320 -o target.avi
 
  
or
+
cat /etc/snmp/snmptrapd.conf
  mencoder source.mpg -srate 24000 -oac mp3lame -lameopts cbr:br=32:vol5:mode=3\
+
  disableAuthorization yes
  -fps 30 -ofps 30 -ovc lavc -vop scale=320:240 -o target.avi
+
  traphandle default /bin/snmppl
  
= extract mpg from .bin =
+
/etc/init.d/snmptrapd restart
Problem: If you use [[file (command)]] on a .bin file, it outputs "data".
+
cat /bin/snmppl
Solution:
+
#!/bin/bash
  [http://www.vcdgear.com vcdgear] -dat2mpg ''infile.bin'' ''outfile.mpg''
+
  date >>/tmp/dates
  
= Software packages =
+
= See also =
== rpms to deb konvertieren ==
+
* http://nagios.sourceforge.net/docs/3_0/quickstart-opensuse.html
alien --to-deb 123.rpm
+
* http://net-snmp.sourceforge.net/wiki/index.php/TUT:snmptrap
 +
* http://www.linuxforums.org/forum/gentoo-linux/108864-net-snmp.html
 +
* http://paulgporter.net/2013/09/16/nagios-snmp-traps/

Revision as of 09:32, 6 May 2014

Trying to build an SNMP prototype

SUSE Linux:

yast -i nagios apache2
/etc/init.d/nagios start
/etc/init.d/apache2 start

Remember your login nagiosadmin:nagiosadmin and point your browser to http://127.0.0.1/nagios

/etc/init.d/snmptrapd
tail -f /var/log/net-snmpd.log
snmptrap -v 2c -c public localhost "" NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 42
No access configuration - dropping trap.

So it seems I have to

cat /etc/snmp/snmptrapd.conf
disableAuthorization yes
traphandle default /bin/snmppl
/etc/init.d/snmptrapd restart
cat /bin/snmppl
#!/bin/bash
date >>/tmp/dates

See also