yum install libpcap;
rpm --nodeps -ihv http://ipband.sourceforge.net/ipband-0.8.1-1.i386.rpm
http://ipband.sourceforge.net/
yum install libpcap;
rpm --nodeps -ihv http://ipband.sourceforge.net/ipband-0.8.1-1.i386.rpm
dmesg| grep rtl
[62227.714606] r8169 0000:01:00.0: firmware: requesting rtl_nic/rtl8168d-1.fw
[62227.733729] r8169 0000:01:00.0: eth0: unable to load firmware patch rtl_nic/rtl8168d-1.fw (-2)
apt-get install -y firmware-realtek
dmesg|tail
[ 1585.583845] usb-storage: device scan complete
[ 1586.111281] scsi 7:0:0:0: Direct-Access Freecom DATABAR 1100 PQ: 0 ANSI: 0 CCS
[ 1586.112143] sd 7:0:0:0: [sdc] 15728640 512-byte logical blocks: (8.05 GB/7.50 GiB)
[ 1586.112891] sd 7:0:0:0: [sdc] Write Protect is off
[ 1586.112893] sd 7:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 1586.112894] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[ 1586.115266] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[ 1586.115328] sdc: sdc1
[ 1586.117758] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[ 1586.117820] sd 7:0:0:0: [sdc] Attached SCSI removable disk
cat debian-6.0.4-amd64-CD-1.iso > /dev/sdc
sync
time tar -cpzf /var/backup/4601.tar.gz -C /vz/private/4601 .
real 3m10.887s - это астрономическое время
user 3m0.454s
sys 0m8.755s
time tar --use-compress-program=pigz -cpf /var/backup/4601.tar.gz -C /vz/private/4601 .
real 0m27.728s - это астрономическое время
user 4m3.871s
sys 0m7.412s
time tar -cpf /var/backup/4601.tar -C /vz/private/4601 .
real 1m10.247s
user 0m1.400s
sys 0m7.596s
real 0m19.414s
user 2m21.545s
sys 0m4.596s
real 0m19.371s
user 2m20.833s
sys 0m4.720s
real 0m19.218s
user 2m21.341s
sys 0m4.368s
real 1m37.801s
user 1m35.586s
sys 0m3.388s
real 1m38.116s
user 1m35.990s
sys 0m3.284s
real 1m38.371s
user 1m36.222s
sys 0m3.092s
real 0m3.175s
user 0m0.052s
sys 0m1.908s
real 0m4.768s
user 0m0.072s
sys 0m2.520s
real 0m5.012s
user 0m0.100s
sys 0m2.456s
time cat Counter-Strike_LinuxServer_with-AmxModX.tar.gz | pigz > archive.pigz
real 0m1.608s
user 0m15.246s
sys 0m0.688s
time cat Counter-Strike_LinuxServer_with-AmxModX.tar.gz | gzip > archive.gz
real 0m10.647s
user 0m10.138s
sys 0m0.602s
arcconf GETSTATUS 1
Controllers found: 1
Logical device Task:
Logical device : 0
Task ID : 105
Current operation : Rebuild
Status : In Progress
Priority : High
Percentage complete : 15
tar --use-compress-program=pigz -cpf /root/archive.tar.gz /data
tar2> >(grep -v 'socket ignored' >&2)
arcconf getlogs 1 dead
0 or 0x00 Unknown failure
1 or 0x01 Device not ready
2 or 0x02 Selection timout
3 or 0x03 User marked the drive dead
4 or 0x04 Hardware error
5 or 0x05 Bad block
6 or 0x06 Retries failed
7 or 0x07 No Response from drive during discovery
8 or 0x08 Inquiry failed
9 or 0x09 Probe(Test Unit Ready/Start Stop Unit) failed
A or 0x0A Bus discovery failed
md5 domains.txt
MD5 (domains.txt) = c97d110cfd4d53633d5dd1cd881b7e1d
php -r "echo md5_file('domains.txt');"
c97d110cfd4d53633d5dd1cd881b7e1d
# based on: http://php.net/manual/ru/function.pcntl-fork.php $worker_processes = 5; $child_processes = array(); for ($i = 0; $i < $worker_processes; $i++) { $child_pid = pcntl_fork(); if ($child_pid == -1) { die ("Can't fork process"); } elseif ($child_pid) { print "Parent, created child: $child_pid\n"; $child_processes[] = $child_pid; # В данный момент все процессы отфоркнуты, можно начать ожидание if ($i == ( $worker_processes -1 ) ) { foreach ($child_processes as $process_pid) { # Ждем завершение заданного дочернего процесса $status = 0; pcntl_waitpid($process_pid, &$status); } } } else { print "Child $i\n"; sleep(10 + $i); # Если здесь не будет exit, то foreach заработает и здесь exit(0); } }
pecl install proctitle channel://pecl.php.net/proctitle-0.1.2
echo "extension=proctitle.so" > /etc/php5/conf.d/proctitle.ini
setproctitle("my_super_process");
while(true) { sleep(10); }
php -f test_proctitle.php
ps aux|grep my_
root 26611 0.0 0.0 292120 12044 pts/8 S+ 18:32 0:00 my_super_process
root 26645 0.0 0.0 112316 876 pts/9 S+ 18:33 0:00 grep my_
cd /usr/ports/shells/bash
make install clean; rehash
chsh -s /usr/local/bin/bash testuser
vi /etc/login.conf
:umask=002:
cap_mkdb /etc/login.conf
cd /usr/ports/www/nginx
make install clean
vi /etc/rc.conf
nginx_enable="YES"
/usr/local/etc/rc.d/nginx start