Home
protei's notes

> recent entries
> calendar
> friends
> profile
> previous 20 entries

Advertisement

Friday, June 26th, 2009
3:12 pm - dhcp
Как искать левые DHCP сервера?

# tcpdump -i eth0 port 67 or port 68
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
^A2^A3^A414:30:31.803780 IP dilbert.equila.ru.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1a:4d:4e:18:6d (oui Unknown), length 548
14:30:31.804601 IP 192.168.0.249.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 277

С другой консоли:
# /usr/lib64/nagios/plugins/check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 3600 sec.
[root@dilbert ~]# nmap 192.168.0.249

Starting Nmap 4.53 ( http://insecure.org ) at 2009-06-26 14:30 MSD
All 1714 scanned ports on 192.168.0.249 are filtered
MAC Address: 00:0F:EA:54:EA:F6 (Giga-Byte Technology Co.)

- и вот он, голубчик.

(comment on this)

Monday, May 18th, 2009
9:12 pm - about: SVN
Svn revert procedure (just for memory):

1. check the revision number just before "moment X" – say 12345
2. svnadmin dump /path/to/current/repo –r1: 12345 > svn.dump
(for example, svnadmin dump /data/repos/somerepo –r1:3490 > somerepo.dmp)
3. svnadmin create /path/to/new/repo
(for example, svnadmin create /data/repos/somerepo2)
4. svnadmin load /path/to/new/repo < svn.dump
(for example, svnadmin load /data/repos/somerepo < somerepo.dmp)
5. rm –fr /data/repos/oldrepo

(1 comment | comment on this)

Tuesday, May 12th, 2009
2:56 pm - firefox + VPN, just for memory
Чтобы отрубить у сабжа попытки ломиться в VPN без спросу, нужно в about:config проставить network.autodial-helper.enabled в false.

Hmm-hmm... а ведь похоже что thunderbird страдает тем же синдромом :(

(comment on this)

Thursday, April 30th, 2009
7:18 pm - wimax
прогресс налицо - появились линуксовые модули!

(comment on this)

Wednesday, April 29th, 2009
5:03 pm - fuck
[root@localhost linux-2.6.27.7]# chroot /mnt/sda1
chroot: cannot run command `/bin/bash': Exec format error
[root@localhost linux-2.6.27.7]# ldd /mnt/sda1/bin/bash
not a dynamic executable
[root@localhost linux-2.6.27.7]# file /mnt/sda1/bin/bash
/mnt/sda1/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
[root@localhost linux-2.6.27.7]#

ну, и как это называется? :(

(comment on this)

Monday, March 16th, 2009
5:15 pm - ora tips
Кто-то дропнул тэйблспейс руками, оракл не встает, что делать?

SQL> ALTER TABLESPACE PROD_TEST_IGOR OFFLINE;
ALTER TABLESPACE PROD_TEST_IGOR OFFLINE
*
ERROR at line 1:
ORA-01109: database not open

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/opt/oracle/oradata/dilbert/prod_test_igor'


Ответ:
startup mount;
alter database datafile 6 offline drop;
alter database open;

P.S. а вообще бы руки поотрывать...

(comment on this)

Wednesday, February 18th, 2009
7:17 pm - count oracle instances
Памятка как посмотреть сколько оракловых инстансов запущено на данной машине:
ps aux|grep pmon
oracle 14087 0.0 0.1 1721268 18020 ? Ss Feb17 0:01 ora_pmon_QUEUEDB
oracle 18558 0.0 0.1 1721264 17876 ? Ss 02:04 0:00 ora_pmon_ETL
oracle 18958 0.0 0.1 1721268 17876 ? Ss 03:22 0:00 ora_pmon_ODS2
oracle 19324 0.0 0.1 1721268 17892 ? Ss 03:53 0:00 ora_pmon_ODS1
root 20088 0.0 0.0 5988 580 pts/3 S+ 04:07 0:00 grep pmon

сколько пмонов, столько и инстансов.

(comment on this)

7:07 pm - http metrics
Грубый, но эффективный способ мониторить некие метрики, доступные только по http:
Read more... )

(comment on this)

Wednesday, February 11th, 2009
3:16 pm - аналог from_unixtime
date -d@1234567890
Sat Feb 14 02:31:30 MSK 2009

занятно, не знал! ;)

(comment on this)

3:06 pm - anti-big-brother

и потом:

- все, весь траффик нашего браузера идет через шифрованный канал, через наш доверенный сайт из destination ;)

(1 comment | comment on this)

Friday, February 6th, 2009
2:29 pm
[root@dilbert rc.d]# iptables -t nat -A PREROUTING -i eth0:1 -p tcp --dport 2222 -j DNAT --to-destination xx.xx.xx.xx:22
Warning: weird character in interface `eth0:1' (No aliases, :, ! or *).
[root@dilbert rc.d]# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere anywhere tcp dpt:EtherNet/IP-1 to:xx.xx.xx.xx:22

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@dilbert rc.d]# iptables --version
iptables v1.4.0

No aliases, но про этом правило вставляется! ;)

(comment on this)

Wednesday, February 4th, 2009
8:02 pm - памятка по expect
[root@unicorn ~]# ./Proxy-log-pkt-total.exp | grep Proxy-log-pkt-total
Proxy-log-pkt-total 17590

[root@unicorn ~]# cat /root/Proxy-log-pkt-total.exp
#!/usr/bin/expect -f
set timeout 60
spawn nebu-pci-com
expect "Please enter the message:"
send "proxy.stats\r"
expect "Proxy Statistics:"
send "\03"
expect eof

(comment on this)

Thursday, January 22nd, 2009
5:33 pm - hyperic+jmx
[hyperic@dogbert ~]$ ~/agent-3.2.2/jre/bin/java -jar ~/agent-3.2.2/pdk/lib/hq-product.jar -Dplugins.include=csc-metrics -m metric
Sun JVM 1.5 CSC metrics Availability:
Sun JVM 1.5 CSC metrics:NebuAd.usermodeler:name=Metrics:Availability:jmx.url=service%3Ajmx%3Armi%3A///jndi/rmi%3A//192.168.0.108%3A9998/jmxrmi,jmx.username=%jmx.username%,jmx.password=%jmx.password%
=>100.0%<=
Sun JVM 1.5 CSC metrics RequestHandlingTime.avg.hr:
Sun JVM 1.5 CSC metrics:NebuAd.usermodeler:name=Metrics:RequestHandlingTime.avg.hr:jmx.url=service%3Ajmx%3Armi%3A///jndi/rmi%3A//192.168.0.108%3A9998/jmxrmi,jmx.username=%jmx.username%,jmx.password=%jmx.password%
=>382.0<=
Sun JVM 1.5 CSC metrics RequestHandlingTime.avg.hr per Minute:
Sun JVM 1.5 CSC metrics:NebuAd.usermodeler:name=Metrics:RequestHandlingTime.avg.hr__RATE__=1m:jmx.url=service%3Ajmx%3Armi%3A///jndi/rmi%3A//192.168.0.108%3A9998/jmxrmi,jmx.username=%jmx.username%,jmx.password=%jmx.password%
[hyperic@dogbert ~]$

Осталось понять, как встроить этот плагин в GUI...

(1 comment | comment on this)

Wednesday, January 21st, 2009
10:28 pm - about: touch + nonrecursive find
The following command sets the modification and access times of the
file named "bastille" to midnight, July 14, 1989, creating the file if
it does not already exist.

touch -t 8907140000 name_file

++ bash-3.2$ /usr/bin/find /nfs-vol0/metadata_snapshots/ -prune ! -type d -mtime +30 -exec rm -f {} \;
проверить, что в SunOS это будет удалять из данного каталога нерекурсивно (!)

(comment on this)

Tuesday, December 30th, 2008
9:07 pm - тень Будды
сложим ладошки лодочкой

(comment on this)

Wednesday, December 10th, 2008
3:13 pm - mobile web server
nmap -O 192.168.0.130

Starting Nmap 4.53 ( http://insecure.org ) at 2008-12-10 15:08 MSK
Interesting ports on 192.168.0.130:
Not shown: 1713 closed ports
PORT STATE SERVICE
80/tcp open http
MAC Address: 00:21:FE:5C:2C:6F (Unknown)
Device type: phone
Running: Nokia Symbian OS 9.X|10.X
OS details: Nokia E90 Communicator or N95 mobile phone (Symbian OS 9.2 - 10.0)
Uptime: 0.011 days (since Wed Dec 10 14:53:30 2008)
Network Distance: 1 hop

OS detection performed. Please report any incorrect results at http://insecure.org/nmap/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 15.056 seconds

Работает на этом ;)

(comment on this)

Wednesday, November 12th, 2008
2:29 pm - памятка про то, как писать DVD
[root@dilbert for_certer]# dvdrecord -dao speed=2 dev=/dev/scd0 FC-6-x86_64-DVD.iso
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'PIONEER '
Identification : 'DVD-RW DVR-112D'
Revision : '1.21'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.
Speed set to 5540 KB/s
Starting to write CD/DVD at speed 4.0 in real SAO mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Track 01: Total bytes read/written: 4088006656/4088006656 (1996097 sectors).

(comment on this)

Friday, November 7th, 2008
8:38 pm - ректальный VNC
root@pitsu:/etc# /usr/sbin/iptables -t nat -I PREROUTING -p tcp -s 89.223.63.70 --dport 22 -j DNAT --to-destination 192.168.1.103:5901
;)

(comment on this)

Saturday, October 18th, 2008
5:00 pm - fork
Ну, вот и все... мальчик, 3.452 кг, 18-го в 17:00 - главное через год не забыть дату рождения, а то жена точно прибьет! :)))

(2 comments | comment on this)

Thursday, October 2nd, 2008
5:33 pm - как посмотреть статус индекса
select status
from user_indexes
where index_name = 'PK_ADJ_IMPRESSION'
- должно быть "VALID"

(comment on this)


> previous 20 entries
> top of page
LiveJournal.com