Wednesday, September 30, 2015

Sniffing serial port raspberry pi

To sniff serial port you need
- two serial ports (can be usb extension)
- install this software http://jpnevulator.snarl.nl/

with this commend all data will passed between interface AMA0 and USB0


 jpnevulator --ascii  --timing-print  --tty /dev/ttyAMA0 --tty /dev/ttyUSB0 -r --pass

On windows I recommend:

http://realterm.sourceforge.net/



Centos 7 Failed to start LSB: Bring up/down networking.

Error in logs:
 

-- Logs begin at lun. 2015-02-16 12:41:51 CET, end at ven. 2015-02-20 11:39:35 CET. --
févr. 20 10:11:47 localhost systemd[1]: Starting LSB: Bring up/down networking...
févr. 20 10:11:48 localhost systemd-sysctl[902]: Overwriting earlier assignment of kernel/sysrq in file '/etc/sysctl.d/51-alt-sysrq.conf'.
févr. 20 09:11:50 localhost network[816]: Démarrage de l'interface loopback :  [  OK  ]
févr. 20 09:12:09 localhost su[1116]: (to avahi) root on none
févr. 20 09:12:11 localhost network[816]: Activation de l'interface eno16777736 :  [  OK  ]
févr. 20 09:12:11 localhost network[816]: Activation de l'interface eth0 :  ERREUR   : [/etc/sysconfig/network-scripts/ifup-eth] Device  does not seem to be present, delaying initialization.
févr. 20 09:12:12 localhost network[816]: [ÉCHEC ]
févr. 20 09:12:12 localhost systemd-sysctl[1184]: Overwriting earlier assignment of kernel/sysrq in file '/etc/sysctl.d/51-alt-sysrq.conf'.
févr. 20 09:12:12 localhost systemd[1]: network.service: control process exited, code=exited status=1
févr. 20 09:12:12 localhost systemd[1]: Failed to start LSB: Bring up/down networking.
févr. 20 09:12:12 localhost systemd[1]: Unit network.service entered failed state.
févr. 20 09:22:40 localhost systemd[1]: Starting LSB: Bring up/down networking...


easy to check using:
 journalctl -ab --no-pager -u network

solution:

Add HWADDR={mac address} to all  ifcfg-* files.
 

Monday, September 14, 2015

Using tar with parallel compression using pigz with multi cores processor

Using tar with parallel compression using pigz with multi cores processor

 
$ tar cvf MYDIRECTORY.tar.gz --use-compress-prog=pigz MYDIRECTORY
 
In a similar way, you can list the contents of the tarball like this: 

$ tar tvf MYDIRECTORY.tar.gz --use-compress-prog=pigz
Or you can extract the tar like this:
$ tar xvf MYDIRECTORY.tar.gz --use-compress-prog=pigz
 

Wednesday, September 2, 2015

Grep /var/log/messages by date without leading zeros

Grep /var/log/messages by date without leading zeros

 
date=`date --date="yesterday" +%b\ %e`
 
grep $date /var/log/messages 

Cybermap

Internet Storm Center Infocon Status

Internet Storm Center Infocon Status
Internet Storm Center Infocon Status