07/31: Cisco > command
07/30: VMware > Kickstart generator
VMware Communities: esx kickstart config generator? ...
cd /usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/
cd /usr/lib/vmware/webAccess/tomcat/apache-tomcat-5.5.17/webapps/ui/WEB-INF/
07/29: debugging with GDB
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;
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;
07/28: CISCO > emulator
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/
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/
07/24: Linux > md5 sum
07/23: Linux > add static route
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
/etc/network/interfaces
up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1
07/22: Linux > nmap
己を知り、敵を知る――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
# 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
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
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
"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);
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
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
07/17: Oracle > checking privileges
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
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
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');
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');
07/08: TELNET GET HTTP
07/06: Windows > OpenVPN server
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
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