Home
protei's notes

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

Advertisement

Thursday, November 26th, 2009
3:30 pm - hehe
root@gump:/>cowsay `cat /etc/slack* && uname -a`
 _______________________________________
/ Slackware 10.2.0 Linux gump 2.4.35 #1 \
| Sat Jul 11 08:09:00 MSK 1936 i686     |
\ unknown unknown GNU/Linux             /
 ---------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

(comment on this)

Monday, November 16th, 2009
8:59 pm - bugzilla backup
[root@elm ~]# mysqldump -u bugs -p --compress --add-drop-table --databases bugs |bzip2 -c >`date +%Y-%m-%d-bugs.sql.bz2`
Enter password:
mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `attach_data` at row: 771
[root@elm ~]# mysqldump -u bugs -p --max_allowed_packet=1G --net_buffer_length=1G --compress --add-drop-table --databases bugs |bzip2 -c >`date +%Y-%m-%d-bugs.sql.bz2`
Enter password:


YESS!

(comment on this)

Friday, October 30th, 2009
4:18 pm - just for memory
SQL> grant manage scheduler to prod_meta with admin option;

Grant succeeded.

SQL> grant create job to prod_meta;

Grant succeeded.

SQL>

grant dba для создания джобов недостаточно! ;)

(2 comments | comment on this)

Wednesday, October 14th, 2009
5:12 pm - fuuuuuuck!
dhcdrop -i eth0 -y -l 00:1B:C0:C0:05:4B
Using interface: 'eth0'
Got response from server 192.168.0.73 (IP-header 192.168.0.73), server ethernet address: 00:16:E6:5B:B7:98, lease time: 1.7e+02h (604800s)
Got BOOTREPLY (DHCPOFFER) for client ether: 00:F2:FB:9A:1D:E0 You IP: 192.168.0.77/24
1. Got BOOTREPLY (DHCPACK) for client ether: 00:F2:FB:9A:1D:E0 You IP: 192.168.0.143/24
2. Got BOOTREPLY (DHCPACK) for client ether: 00:C3:C0:68:29:4C You IP: 192.168.0.113/24
3. Got BOOTREPLY (DHCPACK) for client ether: 00:2B:3A:D9:AC:66 You IP: 192.168.0.39/24
4. Got BOOTREPLY (DHCPACK) for client ether: 00:76:C0:72:D8:83 You IP: 192.168.0.8/24
5. Got BOOTREPLY (DHCPACK) for client ether: 00:82:B4:CD:11:5B You IP: 192.168.0.143/24
6. Got BOOTREPLY (DHCPACK) for client ether: 00:E7:DA:48:33:37 You IP: 192.168.0.102/24
7. Got BOOTREPLY (DHCPACK) for client ether: 00:2C:EC:0E:92:AD You IP: 192.168.0.61/24
8. Got BOOTREPLY (DHCPACK) for client ether: 00:7A:90:FC:FD:F5 You IP: 192.168.0.69/24
9. Got BOOTREPLY (DHCPACK) for client ether: 00:84:E7:88:E0:0E You IP: 192.168.0.218/24
10. Got BOOTREPLY (DHCPACK) for client ether: 00:D4:47:28:0B:38 You IP: 192.168.0.82/24
11. Got BOOTREPLY (DHCPACK) for client ether: 00:27:7C:F7:D5:36 You IP: 192.168.0.62/24
...

Оно не заканчивается! :(

(comment on this)

Saturday, October 10th, 2009
12:48 pm - FC8: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
./log_replay
./log_replay: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./log_replay)

[root@domU-12-31-39-00-E9-E2 ~]#  rpm -q --provides libstdc++
Read more... )

(comment on this)

Friday, October 2nd, 2009
1:47 pm - фигасе!
[root@qanciler scripts]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@qanciler scripts]# mount -o rw,remount /
mount: block device /dev/VolGroup00/LogVol00 is write-protected, mounting read-only
[root@qanciler scripts]# pwd
/root/scripts
[root@qanciler scripts]# touch test
touch: cannot touch `test': Read-only file system
[root@qanciler scripts]#

(2 comments | comment on this)

Thursday, October 1st, 2009
7:22 pm - Apache HTTPS to Tomcat HTTPS - HOW?!
openssl genrsa -des3 -out p.ctasnet.com.key 1024
openssl req -new -key  p.ctasnet.com.key -out  p.ctasnet.com.csr

- somebody before me ;)Read more... )

(comment on this)

Wednesday, September 30th, 2009
1:28 pm - howto insert Russian characters into varchar2?
SQL> shutdown immediate;

---- nothing, wait
in another session:
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Read more... )

(comment on this)

Thursday, September 10th, 2009
7:41 pm - Postgres && locale
-bash-3.2$ createdb -E UTF8 metadb_test
createdb: database creation failed: ERROR:  encoding UTF8 does not match server's locale ru_RU
DETAIL:  The server's LC_CTYPE setting requires encoding ISO_8859_5.
-bash-3.2$ set|grep LANG
LANG=ru_RU.UTF-8
-bash-3.2$ set|grep LC_
LC_COLLATE=ru_RU.UTF-8
LC_CTYPE=ISO_8859_5

Какого, спрашивается, Х..?

Дальше - больше:
Read more... )

(comment on this)

Wednesday, August 26th, 2009
6:30 pm - cisco c2924xl - что поддерживает, памятка
enable
conf t - как у всех

c2924xl#sh interfaces stats
c2924xl#show interfaces accounting
- тут много More

c2924xl#show cdp neighbors detail
c2924xl#show cdp neighbors
c2924xl#show cdp entry * version

sh ip traffic - тут тоже много полезного

c2924xl#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
VLAN1                      192.168.0.1     YES NVRAM  up                    up
FastEthernet0/1            unassigned      YES unset  up                    up
FastEthernet0/2            unassigned      YES unset  up                    up
FastEthernet0/3            unassigned      YES unset  up                    up
FastEthernet0/4            unassigned      YES unset  up                    up
FastEthernet0/5            unassigned      YES unset  up                    up
FastEthernet0/6            unassigned      YES unset  down                  down
FastEthernet0/7            unassigned      YES unset  down                  down
FastEthernet0/8            unassigned      YES unset  up                    up
FastEthernet0/9            unassigned      YES unset  up                    up
FastEthernet0/10           unassigned      YES unset  up                    up
FastEthernet0/11           unassigned      YES unset  up                    up
FastEthernet0/12           unassigned      YES unset  up                    up
FastEthernet0/13           unassigned      YES unset  up                    up
FastEthernet0/14           unassigned      YES unset  up                    up
FastEthernet0/15           unassigned      YES unset  down                  down
FastEthernet0/16           unassigned      YES unset  up                    up
FastEthernet0/17           unassigned      YES unset  down                  down
FastEthernet0/18           unassigned      YES unset  up                    up
FastEthernet0/19           unassigned      YES unset  down                  down
FastEthernet0/20           unassigned      YES unset  down                  down
FastEthernet0/21           unassigned      YES unset  down                  down
FastEthernet0/22           unassigned      YES unset  down                  down
FastEthernet0/23           unassigned      YES unset  down                  down
FastEthernet0/24           unassigned      YES unset  up                    up
c2924xl#

Главный вопрос - как узнать, умеет ли этот зверь netflow?

(comment on this)

Thursday, August 13th, 2009
9:09 pm - netcat
Баян, но все равно удивительно:
nc -l 1234 (потом идем браузером на http://192.168.0.111:1234 и видим в консоли):
GET / HTTP/1.1
Host: 192.168.0.111:1234
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive


Нет, я знал про nc, но как-то до сих пор TamperData, TamperData ;)

(comment on this)

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)


> previous 20 entries
> top of page
LiveJournal.com