Archives

You are currently viewing archive for July 2008
Category: CISCO
Posted by: hajime osako
Cisco 基本コマンド

# show processes cpu
# show processes memory
Category: Linux tips
Posted by: hajime osako
VMware Communities: esx kickstart config generator? ...

cd /usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/

Category: Web dev
Posted by: hajime osako
debugging with GDB

# gdb binary coredumpfile

(gdb) run
Category: Oracle
Posted by: hajime osako
Thousands of Oracle & DB2 & SQL people answering each others questions

SELECT Total.name "Tablespace Name",
Free_space, (total_space-Free_space) Used_space, total_space
FROM
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) TOTAL_SPACE
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name = Total.name;


select a.TABLESPACE_NAME,
a.BYTES bytes_used,
b.BYTES bytes_free,
b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
from
(
select TABLESPACE_NAME,
sum(BYTES) BYTES
from dba_data_files
group by TABLESPACE_NAME
)
a,
(
select TABLESPACE_NAME,
sum(BYTES) BYTES ,
max(BYTES) largest
from dba_free_space
group by TABLESPACE_NAME
)
b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
order by ((a.BYTES-b.BYTES)/a.BYTES) desc;

Category: CISCO
Posted by: hajime osako
Download dynamips http://www.ipflow.utc.fr/blog/
Download dynagen http://sourceforge.net/project/showfiles.php?group_id=160317
Copy IOS image into some where like /opt/dynagen/images/
unzip an image for improving the performance
unzip -p urchived_image.bin > extracted_image.image
create an ini file based on simple1.ini
modify this ini file

# dynamips -H 7200 &
# dynagen /opt/dynagen/simple1.net

http://netguide.sakura.ne.jp/dynamips/
Category: Linux tips
Posted by: hajime osako
FTPサイトに置かれているmd5sumとは

$ md5sum --check SUMS.md5sum
Category: Linux tips
Posted by: hajime osako
Howto add permanent static routes in Ubuntu -- Ubuntu Geek

/etc/network/interfaces
up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1

07/22: Linux > nmap

Category: Linux tips
Posted by: hajime osako
己を知り、敵を知る――Nmapで見つめ直す自分の姿 - @IT

# nmap -sT -sU -P0 -p 67-68 -oN result.log 192.168.0.*

# nmap -p 1-9999 -A 192.168.1.0/24 --exclude 192.168.1.100 -oX nmapTest1.1.xml

Category: Z. links
Posted by: hajime osako
CodeGuru: Execute Applications on Remote Systems

Features

* With this program you can run as many remote commands on the remote machine as you want. (PSEXEC supports only one remote command on the remote machine at the same time)
* You can execute internal commands (dir,..) directly.
xCmd.exe \\remote dir
* You can start a light "telnet" connection with a remote machine without any telnet server
xCmd.exe \\remote cmd

07/21: Oracle > Tips

Category: Oracle
Posted by: hajime osako
"select sid,serial# from v$session where username"

SQL Trace を取得する方法 - DBMS_MONITOR - SQL shutdown abort

select sid,serial# from v$session where username = 'xxxx';
exec dbms_monitor.session_trace_enable(148,46);
Category: Web dev
Posted by: hajime osako
ArchWiki :: Subversion backup and restore - ArchWiki
svnadmin dump /path/to/reponame > /tmp/reponame.dump
svnadmin create /path/to/reponame
svnadmin load /path/to/reponame < /tmp/repo1.dump


Notes on installing cygwin subversion as a service on Windows 2003
Use cygrunsrv to install svnserve.exe as a service
I ran this from a cygwin shell window
cygrunsrv \
--install SvnServe \
--chdir D:\\SvnRepo \
--path C:\\cygwin\\lib\\subversion\\bin\\svnserve.exe \
--args "--foreground --daemon --root=/cygdrive/d/SvnRepo" \
--desc "Subversion for D:\\SvnRepo" \
--neverexits
Category: Oracle
Posted by: hajime osako
iT-folder IT関連情報を配信
Oracle/PLSQL: Oracle System Tables

DBA_USERSの参照:
select USERNAME,ACCOUNT_STATUS from DBA_USERS;

SYSDBA/SYSOPER権限ユーザの確認:
select * from v$pwfile_users;

Check privileges by table name:
select * from dba_tab_privs where table_name = 'xxxxxx';

Checking the owner of table:
select owner, table_name from dba_tables where table_name = 'xxxxxxxx';

Search the column
select owner, table_name, column_name from dba_col_comments where column_name like '%xxxxx%'; (CAPITAL)

Checking the value of timed_statistics:
select value from v$parameter where name = ‘timed_statistics’;

Check SQL values:
SELECT
a.sql_text,
b.name,
b.position,
b.datatype_string,
b.value_string
FROM
v$sql_bind_capture b,
v$sqlarea a
WHERE
b.sql_id = a.sql_id
Category: Oracle
Posted by: hajime osako
Talking Tuning: Tracing SQL in Oracle Database 10g

exec dbms_monitor.serv_mod_act_trace_enable(service_name=>'xxxx');
Or
alter system set sql_trace=true;

The default log is in $ORACLE_BASE\instance_name\admin\udump

To analyse:
# trcsess output="*.trc" service="xxxxx"
# cat *.trc > udump.trc
# tkprof udump.trc output.txt sys=no ( explain=cpsuser/cpsuser sort=(execpu))

To disable:
exec dbms_monitor.serv_mod_act_trace_disable(service_name=>'xxxx');

» Read More

Category: Web dev
Posted by: hajime osako
"localecho"

HOW TO: Request a Web Page Through a Telnet Client

set localecho
GET / HTTP/1.1
Category: MS tips
Posted by: hajime osako
OpenVPN Windows HowTo | IT Support London - runPCrun

1) Install OpenVPN
2) Configure OpenVPN (c:\program files\openvpn\config\)
3) Set up a Certificate Authority (CA)
4) Set up server key and certificate
5) Setup VPN routing
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters