Linux
bogus intrusion attempt
by dervish on Mar.28, 2016, under Linux, Red Hat
Active log file changed? No way!
[root@entbamboo01 logs]# tmpwatch –test –mtime +7 –nodirs /opt/bamboo/atlassian-bamboo-5.9.7/logs/*log
error: directory /opt/bamboo/atlassian-bamboo-5.9.7/logs/catalina.2015-10-20.log changed right under us!!!
error: this indicates a possible intrusion attempt
HP DV6000 Linux Webcam
by dervish on Jan.23, 2016, under Hardware, Linux, Mint
Installation
========
1. sudo add-apt-repository ppa:r5u87x-loader/ppa
2. sudo apt-get update
3. sudo apt-get install r5u87x
4. sudo /usr/share/r5u87x/r5u87x-download-firmware.sh
Cheese, etc, should now detect the camera.
find wwn disk id on redhat hat fiber card
by dervish on Dec.09, 2015, under Linux
find WWN for red hat fiber
cd /sys/class/scsi_host;for i in 0 1 2 3 4 5; do cat host$i/device/fc_host/host$i/port_name; done
Oracle libclntsh cannot open/no such file
by dervish on Dec.02, 2015, under Linux
Can’t load ‘/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200
add $ORACLE_HOME/lib to ld.so.conf.d
run ldconfig
Example:
# ~hopkins_j/perltest
Can’t load ‘/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so’ for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at /export/home/hopkins_j/perltest line 13
Compilation failed in require at /export/home/hopkins_j/perltest line 13.
BEGIN failed–compilation aborted at /export/home/hopkins_j/perltest line 13.
# vi /etc/ld.so.conf.d/oracle-client.conf
# cat oracle-client.conf
/u01/app/oracle/product/11.2.0/dbhome_1/lib
# ldconfig
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmcfhc.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmastk.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmevq.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefsqlt.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefsql.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmevsp.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefojmx.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefos.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmeoci.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmadm.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefpfa.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefut.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmemso.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefdms.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmadbg.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmcfsga.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmarl.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmevc.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmasf.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefvr.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefsp.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefud.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefport.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmalk.so.0 is empty, not checked.
ldconfig: File /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnmefw.so.0 is empty, not checked.
ldconfig: /u01/app/oracle/product/11.2.0/dbhome_1/lib/libexpat.so.1 is not a symbolic link
# ~hopkins_j/perltest
Hello World
Toggle Swap
by dervish on May.02, 2015, under Linux
#!/bin/bash
free_data="$(free)"
mem_data="$(echo "$free_data" | grep 'Mem:')"
free_mem="$(echo "$mem_data" | awk '{print $4}')"
buffers="$(echo "$mem_data" | awk '{print $6}')"
cache="$(echo "$mem_data" | awk '{print $7}')"
total_free=$((free_mem + buffers + cache))
used_swap="$(echo "$free_data" | grep 'Swap:' | awk '{print $3}')"
echo -e "Free memory:\t$total_free kB ($((total_free / 1024)) MB)\nUsed swap:\t$used_swap kB ($((used_swap / 1024)) MB)"
if [[ $used_swap -eq 0 ]]; then
echo "Congratulations! No swap is in use."
elif [[ $used_swap -lt $total_free ]]; then
echo "Freeing swap..."
sudo swapoff -a
sudo swapon -a
else
echo "Not enough free memory. Exiting."
exit 1
fi
Scott Severance from askubuntu.com