Pages: 1/27 First page 1 2 3 4 5 6 7 8 9 10 Next page Final page [ View by Articles | List ]
System has been restarted everything seemed normal, the application starts normally! View the system boot log, there is no exception, the specific reasons for this situation also unknown now! It seems  need to continue to observe.

However, open system, found that swap partition 0
Swap:        0k total,        0k used,        0k free,   300496k cached

Is it did not installed the system swap partition?
[root@youke2 log]# cat /proc/swaps

output Nothing, there is no swap partition indeed !
this System has 4G mem, so additional 8G swap space manually
[root@youke2 log]# dd if=/dev/zero of=/tmp/swapfree bs=1024K count=8192
8192+0 records in 8192+0 records out 8589934592 bytes (8.6 GB) copied, 111.247 seconds, 77.2 MB/s


[root@youke2 log]# mkswap /tmp/swapfree
Setting up swapspace version 1, size = 8589930 kB

[root@youke2 log]# swapon /tmp/swapfree

Re-examine swap partition:

[root@youke2 log]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/tmp/swapfree                           file            8388600 0       -1

USE top TO CHECK  
Tasks: 145 total,   1 running, 144 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.2%sy,  0.0%ni, 94.4%id,  5.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4138172k total,  3834908k used,   303264k free,    28220k buffers
Swap:  8388600k total,        0k used,  8388600k free,  3605544k cached

OK! write this to fstab file,so it can valid at system start time !
/tmp/swapfree           swap                    swap    defaults        0 0

compile net-snmp on debian lenny

[不指定 2009/09/23 16:16 | by askwan ]
net-snmp
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
./configure --prefix=/usr/local/net-snmp/ --with-sys-contact="askwan@askwan.com" --with-sys-location="pudong shanghai China" --enable-shared --with-default-snmp-version=2 --enable-mfd-rewrites --with-mib-modules="misc/ipfwacc mibII host disman/event-mib ucd_snmp agent_mibs agentx notification target utilities ucd-snmp/diskio tunnel mibII/mta_sendmail" --with-sysconfdir="/usr/local/net-snmp/etc/"

如编译报错:
Quotation
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status

这是缺少libperl-dev开发库,安装上
apt-get install libperl-dev

然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
cp  EXAMPLE.conf /usr/local/net-snmp/etc/snmpd.conf

然后根据需要修改此文件
com2sec local     localhost       askwan
com2sec mynetwork 192.168.0.0/24      askwan

group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local
group MyROGroup v1         mynetwork
group MyROGroup v2c        mynetwork
group MyROGroup usm        mynetwork

view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none

syslocation shanghai pu dong
syscontact Me askwan@askwan.com

启动
/usr/local/net-snmp/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -c /usr/local/net-snmp/etc/snmpd.conf


测试
snmpwalk -c askwan -v2c 192.168.0.5 if

Quotation
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....


---------END------------
Tags: ,
临时表空间用途:
INDEX CREATE ,INDEX REBUILD,ORDER BY ,GROUP BY, DISTINCT,Analyze,UNION, Sort-Merge etc..
上面这些操作均会用到临时表空间

临时表空间重建步骤:
比如临时表空间一直增大,导致系统磁盘空间吃紧,考虑重建
1 定位当前临时表空间位置
Quotation
SQL> SELECT FILE_NAME,TABLESPACE_NAME FROM DBA_TEMP_FILES;

FILE_NAME                                                                        TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
/u01/oracle/oradata/askwan/temp01.dbf                                            TEMP


2 创建临时表空间TEMP02
Quotation
SQL> CREATE TEMPORARY TABLESPACE TEMP02 TEMPFILE '/u01/oracle/oradata/askwan/temp02.dbf'
SIZE 100M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE UNLIMITED;

Tablespace created


review:
Quotation
SQL>  SELECT FILE_NAME,TABLESPACE_NAME FROM DBA_TEMP_FILES;

FILE_NAME                                                                        TABLESPACE_NAME
-------------------------------------------------------------------------------- ------------------------------
/u01/oracle/oradata/askwan/temp01.dbf                                            TEMP
/u01/oracle/oradata/askwan/temp02.dbf                                            TEMP02

have created successfull.


3 改变缺省临时表空间为TEMP02
Quotation
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP02;

Database altered


4 .删除原缺省表空间temp
Quotation
SQL> drop tablespace temp including contents and datafiles;

Tablespace dropped


5.创建新表空间temp
Quotation
SQL> CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/oracle/oradata/askwan/temp.dbf'
SIZE 100M REUSE AUTOEXTEND ON NEXT 512K MAXSIZE UNLIMITED;

Tablespace created


6. 改变缺省表空间
Quotation
SQL> alter database default temporary tablespace temp;

Database altered


7.删除中间过程表空间TEMP02
Quotation
SQL> drop tablespace temp02 including contents and datafiles;

Tablespace dropped


8.重新指定用户临时表空间
Quotation
SQL> alter user ASKWAN temporary tablespace temp;

User altered


涉及临时文件相关操作
eg.
alter database tempfile '/u01/oracle/oradata/askwan/temp.dbf'  autoextend off;
alter database tempfile '/u01/oracle/oradata/askwan/temp.dbf'  resize 300M;
alter database tempfile ''/u01/oracle/oradata/askwan/temp.dbf' autoextend on;
Pages: 1/27 First page 1 2 3 4 5 6 7 8 9 10 Next page Final page [ View by Articles | List ]