Blog ľudí z AXON PRO. Môžu tu byť zobrazené rôzne názory, jedná sa o názory týchto jednotlivcov, nie firmy AXON PRO.
|
|
linux & co
|
|
Napísal Ernest Beinrohr
|
|
Štvrtok, 17 jún 2010 |
fdisk -H 224 -S 56 /dev/sda
- create partitions
dd if=/dev/sda of=/dev/sdb count=100000
dd if=/dev/sda of=/dev/sdc count=100000
dd if=/dev/sda of=/dev/sdd count=100000
- stupid partition copy (same disks required!)
mdadd --create /dev/md1 --level 10 --raid-devices 4 /dev/sd[a-d]3 --chunk=1024
# see calculator http://busybox.net/~aldot/mkfs_stride.html
mkfs.ext3 -b 4096 -E stride=256,stripe-width=512 /dev/md1
|
|
Posledná úprava ( Štvrtok, 17 jún 2010 )
|
|
linux & co
|
|
Napísal Ernest Beinrohr
|
|
Štvrtok, 17 jún 2010 |
Monitoring a RedHat cluster:
snmpwalk -v3 -u username -A password -a md5 hostname \
-l authNoPriv REDHAT-CLUSTER-MIB::RedHatCluster
Monitoring 3ware disk array
snmpwalk -v3 -u username -A password -a md5 hostname \
-l authNoPriv TW-RAID-MIB::twRaidMIB
With nagios you can use checkcommands, and custom variables for hosts as:
define command {
command_name check_snmp3_mib
command_line /usr/lib/nagios/plugins/check_snmp -U $_HOSTSNMP_USERNAME$ \
-A $_HOSTSNMP_PASSWORD$ -L $_HOSTSNMP_SECLEVEL$ -a $_HOSTSNMP_AUTHPROT$ \
-H $HOSTADDRESS$ -m $ARG1$ -o $ARG1$::$ARG2$.0 -w $ARG3$ -c $ARG4$ -l $ARG2$
}
define host{
use generic-host
name generic-host-company
register 0
parents Internet
_SNMP_USERNAME username
_SNMP_PASSWORD password
_SNMP_SECLEVEL authNoPriv
_SNMP_AUTHPROT MD5
}
define service{
use company-service
host_name hostname
service_description rhcClusterFailedServicesNum
check_command check_snmp3_mib!REDHAT-CLUSTER-MIB!rhcClusterFailedServicesNum!1!0
}
|
|
Posledná úprava ( Štvrtok, 17 jún 2010 )
|
|
linux & co
|
|
Napísal Ernest Beinrohr
|
|
Štvrtok, 08 október 2009 |
export PS4=' ${BASH_SOURCE}:${LINENO}(${FUNCNAME[0]}) '
ant run some code "sh -x script.sh"
|
|
|
linux & co
|
|
Napísal Ernest Beinrohr
|
|
Štvrtok, 08 október 2009 |
alias server="python -m SimpleHTTPServer $*"
and then it's just a matter of running "server" or "server 5000"
|
|
|
linux & co
|
|
Napísal Ernest Beinrohr
|
|
Pondelok, 02 február 2009 |
- Download source python code from http://code.google.com/p/picasa2gallery/
- [
svn checkout http://picasa2gallery.googlecode.com/svn/trunk/ picasa2gallery-read-only
]
- Download and import picasa button
- Download source python code from http://code.google.com/p/galleryuploader/
- [ svn checkout http://galleryuploader.googlecode.com/svn/trunk/ galleryuploader-read-only
]
- Create
wrapper script. As picasa is not native linux app but is running
through wine, it exports files to C:\windows\temp\. This wrapper script
changes this to real linux paths. Please adjust the paths:
#!/bin/sh
# $Id: picasa2gallery_wrapper.sh,v 1.1 2009/01/31 22:51:38 cvsoernii Exp $
ALLFILES=$(echo $* | sed -e 's/C:\\/\/home\/oernii\/.google\/picasa\/3.0\/drive_c\//g' -e 's/\\/\//g')
python /home/oernii/bin/picasa2gallery-svn/picasa2gallery.py $ALLFILES
- Edit picasa button to read: <param name="exe_path" value="/home/oernii/bin"/> Adjust the path in the script AND in the button to reflect your setup.
PS: degugging tip: run a dry test of galleryuploader in a terminal window first. Try download and save your folders list for example:
python gup.py --list-albums -G http://my.gallery/gallery2/ --save=myGallery -u g2USER -p YOURPASSWORD
This should create 2 files and your ~/.gup/ directory.
|
|
Posledná úprava ( Pondelok, 02 február 2009 )
|
|
|
linux & co
|
|
Napísal Ernest Beinrohr
|
|
Štvrtok, 09 október 2008 |
|
#!/usr/bin/perl
# $Id: split-logs,v 1.1 2008/10/09 08:59:44 cvsoernii Exp $
# based on apache split-logs
%is_open = ();
while ($log_line = <STDIN>) {
# "-" is the splitting char, change as needed
($vhost) = split (/-/, $log_line);
# if the log line does NOT match this date format
# then appned it to previous log file
if ($log_line !~ /^[0-9]{2}.[0-9]{2}.[0-9]{4}-/)
{
$vhost = $oldhost;
}
if (! $is_open{$vhost}) {
open $vhost, ">>${vhost}.log"
or die ("Can't open ${vhost}.log");
$is_open{$vhost} = 1;
}
printf $vhost "%s", $log_line;
$oldhost = $vhost;
}
exit 0;
|
|
Posledná úprava ( Štvrtok, 09 október 2008 )
|
|
|
linux & co
|
|
Napísal OERNii
|
|
Utorok, 07 október 2008 |
|
sfdisk -d /dev/sdb | sfdisk /dev/sda
|
|
Posledná úprava ( Utorok, 07 október 2008 )
|
|
|
linux & co
|
|
Napísal OERNii
|
|
Štvrtok, 18 september 2008 |
convmv -f latin2 -t utf8 --nosmart . -r
PS: http://freshmeat.net/projects/convmv/
|
|
Posledná úprava ( Utorok, 07 október 2008 )
|
|
|
Devel
|
|
Napísal Rio
|
|
Štvrtok, 12 jún 2008 |
|
V pondelok 9. júna 2008 sme boli v Prahe na Adobe AIR tour.
|
|
Posledná úprava ( Štvrtok, 18 september 2008 )
|
|
Celý článok...
|
|
|
Devel
|
|
Napísal Rio Malaschitz
|
|
Streda, 04 jún 2008 |
|
PingPongová liga sa stala v našej firme už pravidelná a tu je prehľad doterajších výsledkov.
|
|
Posledná úprava ( Streda, 04 jún 2008 )
|
|
Celý článok...
|
|
|
linux & co
|
|
Napísal OERNii
|
|
Pondelok, 02 jún 2008 |
|
export IFS=$'\n'
DIR=/tmp/download/
cd $DIR
for file in $(find . -maxdepth 2 -type d ); do echo $file;done
|
|
Posledná úprava ( Utorok, 07 október 2008 )
|
|
|
linux & co
|
|
Napísal OERNii
|
|
Štvrtok, 29 máj 2008 |
|
Na rozdiel od kde, ktore ma defaultne zabudovany menic obrazkov na pozadi, v gnome som na priatelkynom pc nic take nenasiel. Takze trocha googlovat a skipt je hotovy.
#!/bin/bash
# $Id: change_gnome_wallpaper,v 1.1 2008/05/29 10:23:52 cvsoernii Exp $
DIR=/net/192.168.1.100/raid/fotky/_vytlacit/
FILE=$(for i in `find $DIR -type f`; do echo "$RANDOM $i"; done |sort|head -n1|cut -f2 -d" ")
gconftool-2 -s /desktop/gnome/background/picture_filename $FILE -t string
staci ho supnut do pravidelneho crontabu pouzivatela
> crontab -e
a tam napisat napriklad:
*/5 * * * * /home/user/change_gnome_wallpaper
|
|
Posledná úprava ( Utorok, 07 október 2008 )
|
|
|
linux & co
|
|
Napísal OERNii
|
|
Streda, 28 máj 2008 |
# Write
sync; time bash -c "dd if=/dev/zero bs=1024k count=2048 of=/dev/bigraid/testspeed; sync"
# Read
sync; time bash -c "dd of=/dev/zero bs=1024k count=2048 if=/dev/bigraid/testspeed; sync"
|
|
Posledná úprava ( Utorok, 07 október 2008 )
|
|
|
|