Category Archives: UNIX/Linux

UNIX-like system

df , fdisk command

最近总结些命令,这些命令与健康检查有关系。希望这是第一次总结,也是最后一次总结。

df命令查看磁盘空间使用率,如果磁盘资源耗尽,可能导致数据库无法提供服务。所以健康检查的时候也要查看磁盘使用情况。如果空间不足,需要及时清理或是更换存储。

df命令

df – report file system disk space usage

默认情况下,df以k为单位,显示文件系统磁盘空间使用率。通常我们可以使用df -hT命令以人类可读(human-readable)的方式查看磁盘使用率,T表示Type,显示文件系统类型:

read more »

Install 64 bit VirtualBox

安装64bit VirtualBox时应注意如下一句:

The package architecture has to match the Linux kernel architecture, that is, if you are running a 64-bit  kernel, install the appropriate AMD64 package (it does not matter if you have an Intel or an AMD CPU).

所以,如果是64位版本,不管是Intel or AMD,下载AMD版本就好:

Red Hat Enterprise Linux 5 (“RHEL5″) / Oracle Linux 5 (“OL5″) / CentOS 5 i386 | AMD64

执行如下命令安装成功: read more »

*.tar.z文件解压

要想在AIX上解压zip文件,先要上传一个包:unz550x-aix5L.tar.z,这个*.tar.z文件如何解压?

-bash-3.00$ pwd
/home/v/w/shi.qiu/tmp
-bash-3.00$ ls
unz550x-aix5L.tar.Z
-bash-3.00$ uncompress unz550x-aix5L.tar.Z 
-bash-3.00$ ls
unz550x-aix5L.tar
-bash-3.00$ tar xvf unz550x-aix5L.tar 
x unzip-5.50
x unzip-5.50/LICENSE, 3020 bytes, 6 media blocks.
x unzip-5.50/README, 12487 bytes, 25 media blocks.
x unzip-5.50/WHERE, 19126 bytes, 38 media blocks.
x unzip-5.50/funzip, 22230 bytes, 44 media blocks.
x unzip-5.50/funzip.1, 4941 bytes, 10 media blocks.
x unzip-5.50/funzip.txt, 4180 bytes, 9 media blocks.
x unzip-5.50/unzip, 115254 bytes, 226 media blocks.
x unzip-5.50/unzip.1, 40158 bytes, 79 media blocks.
x unzip-5.50/unzip.txt, 48245 bytes, 95 media blocks.
x unzip-5.50/unzipsfx, 55930 bytes, 110 media blocks.
x unzip-5.50/unzipsfx.1, 14660 bytes, 29 media blocks.
x unzip-5.50/unzipsfx.txt, 15236 bytes, 30 media blocks.
x unzip-5.50/zipgrep, 1157 bytes, 3 media blocks.
x unzip-5.50/zipgrep.1, 3814 bytes, 8 media blocks.
x unzip-5.50/zipgrep.txt, 3603 bytes, 8 media blocks.
x unzip-5.50/zipinfo is a symbolic link to unzip.
x unzip-5.50/zipinfo.1, 22059 bytes, 44 media blocks.
x unzip-5.50/zipinfo.txt, 23945 bytes, 47 media blocks.
x unzip-5.50/buildlog.txt, 3637 bytes, 8 media blocks.
-bash-3.00$ ls
unz550x-aix5L.tar  unzip-5.50
-bash-3.00$ cd unzip-5.50/
-bash-3.00$ ls
LICENSE       funzip      unzip.1     unzipsfx.txt  zipinfo
README        funzip.1    unzip.txt   zipgrep       zipinfo.1
WHERE         funzip.txt  unzipsfx    zipgrep.1     zipinfo.txt
buildlog.txt  unzip       unzipsfx.1  zipgrep.txt

Hacker or NOT?

客户服务器可能遭到攻击(与我们之前预测一样),记录如下:
以root用户登录,su – oracle无法执行
查看进程,发现有大量scanssh进程

[[email protected] scripts]$ ps -ef
 oracle    5877     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5878     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5879     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5880     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5881     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5883     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5884     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5886     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5887     1  0 22:04 pts/1    00:00:00 ./scanssh
 oracle    5888     1  0 22:04 pts/1    00:00:01 ./scanssh
 oracle    5889     1  0 22:04 pts/1    00:00:00 ./scanssh
 省略部分

根据网上说明,发现/var/tmp目录下有两个奇怪的隐藏目录: read more »

AIX命令速记

在AIX上装RAC,顺便学习下上面的命令。之前仅接触过HP-UX和SUN Solaris。

-bash-3.00$ uname -a
AIX aix 3 5 00C97AC04C00powerpc unknown AIX

Purpose:Displays the name of the current operating system.

Description
The uname command writes to standard output the name of the operating system that you are using.
The machin ID number contains 12 characters in the following digit format: xxyyyyyymmss. The xx positions indicate the system and is always 00. The yyyyyy positions contain the unique ID number for the entire system. The mm position represents the model ID. The ss position is the submodel number and is always 00. The model ID describes the ID of the CPU Planar, not the model of the System as a whole.

Machine        Machine      Machine
Type          Model           ID

7043           140             4C
7043           240             4C

7248           43P             4C

read more »

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress