Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2154368
  • 博文数量: 157
  • 博客积分: 10047
  • 博客等级: 上将
  • 技术积分: 6757
  • 用 户 组: 普通用户
  • 注册时间: 2005-05-19 11:38
文章分类

全部博文(157)

文章存档

2011年(16)

2010年(50)

2009年(42)

2008年(49)

我的朋友

分类: Oracle

2010-03-04 14:53:44

starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
Thu Mar  4 11:48:07 2010
ALTER DATABASE   MOUNT
Thu Mar  4 11:48:07 2010
sculkget: failed to lock /u01/app/oracle/product/10.2.0/db_1/dbs/lkFDS exclusive
sculkget: lock held by PID: 3443
Thu Mar  4 11:48:07 2010
ORA-09968: unable to lock file
Linux Error: 11: Resource temporarily unavailable
Additional information: 3443
Thu Mar  4 11:48:07 2010
ORA-1102 signalled during: ALTER DATABASE   MOUNT...
 
提示进程3443锁定该资源,根据上次的启动日志发现该进程是Oracle的后台进程
DBWR,根据文档提示236794.1可能是该进程已经挂死,导致数据库无法正常运行。
fuser -u /u01/app/oracle/product/10.2.0/db_1/dbs/lkFDS
 
 
 
 
PMON started with pid=2, OS id=3437
MMAN started with pid=4, OS id=3441
PSP0 started with pid=3, OS id=3439
DBW0 started with pid=5, OS id=3443
LGWR started with pid=6, OS id=3445
CKPT started with pid=7, OS id=3447
SMON started with pid=8, OS id=3449
RECO started with pid=9, OS id=3451
CJQ0 started with pid=10, OS id=3453
MMON started with pid=11, OS id=3455
Tue Feb 16 11:08:17 2010
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
MMNL started with pid=12, OS id=3457
Tue Feb 16 11:08:17 2010
starting up 1 shared server(s) ...
Tue Feb 16 11:08:18 2010
ALTER DATABASE   MOUNT
Tue Feb 16 11:08:22 2010
Setting recovery target incarnation to 2
Tue Feb 16 11:08:22 2010
Successful mount of redo thread 1, with mount id 1844152034
Tue Feb 16 11:08:22 2010
Database mounted in Exclusive Mode
Completed: ALTER DATABASE   MOUNT
Tue Feb 16 11:08:22 2010
ALTER DATABASE OPEN
 
losf 查看锁定进程
# lsof |grep lkFDS                                       
oracle     4476 oracle   17uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4478 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4480 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4482 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4484 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4486 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4488 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4490 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4492 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4494 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4496 oracle   15uR     REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4513 oracle   15u      REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4531 oracle   15u      REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4534 oracle   15u      REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
oracle     4812 oracle   15u      REG        8,7         24    2911344 /var/oracle/product/10.2.0/db_1/dbs/lkFDS
 
fuser查看锁定进程
# fuser -u /u01/app/oracle/product/10.2.0/db_1/dbs/lkFDS 
/u01/app/oracle/product/10.2.0/db_1/dbs/lkFDS:  4476(oracle)  4478(oracle)  4480(oracle)  4482(oracle)  4484(oracle)  4486(oracle)  4488(oracle)  4490(oracle)  4492(oracle)  4494(oracle)  4496(oracle)  4513(oracle)  4531(oracle)  4534(oracle)  4812(oracle)
[root@CHN-DG-3-5CE ~]#
 

请教fuser的作用及具体用法!

fuser Command

Purpose

Identifies processes using a file or file structure.

Syntax

fuser [ -c | -d | -f ] [ -k ] [ -u ] [ -x ] [ -V ]File ...

Description

The fuser command lists the process numbers of local processes that use the
local or remote files specified by the File parameter. For block special
devices, the command lists the processes that use any file on that device.


c Uses the file as the current directory.

e Uses the file as a program's executable object.

r Uses the file as the root directory.

s Uses the file as a shared library (or other loadable object).

The process numbers are written to standard output in a line with spaces between
process numbers. A new line character is written to standard error after the
last output for each file operand. All other output is written to standard
error.

The fuser command will not detect processes that have mmap regions where that
associated file descriptor has since been closed.

Flags

-c Reports on any open files in the file system containing File.

-d Implies the use of the -c and -x flags. Reports on any open files which have
been unlinked from the file system (deleted from the parent directory). When
of the deleted file.

-f Reports on open instances of File only.

-k Sends the SIGKILL signal to each local process. Only the root user can kill a
process of another user.

-u Provides the login name for local processes in parentheses after the process
number.

-V Provides verbose output.

-x Used in conjunction with -c or -f, reports on executable and loadable objects
in addition to the standard fuser output.

Examples

  1. To list the process numbers of local processes using the /etc/passwd file,
     enter:

     fuser /etc/passwd

  2. To list the process numbers and user login names of processes using the

     fuser -u /etc/filesystems

  3. To terminate all of the processes using a given file system, enter:

     fuser -k -x -u /dev/hd1 -OR-

     fuser -kxuc /home

     Either command lists the process number and user name, and then terminates
     each process that is using the /dev/hd1 (/home) file system. Only the root
     user can terminate processes that belong to another user. You might want to
     use this command
阅读(1693) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~