lsof

Purpose

Lists the open files of the local clients.

Syntax and Description

lsof [--suppressheader] {-G diskgroup|--dbname db| -C instance}

Table 10-36 lists the syntax options for the lsof command.


Table 10-36 Options for the lsof command

Option Description

--suppressheader

Suppresses column headings.

-G diskgroup

List files only from the specified disk group.

--dbname db

List files only from the specified database.

-C instance

List files only from the specified instance.


Example

The following are examples of the lsof command. The first example lists the open files for the data disk group. The second example lists the open files for the Oracle ASM instance.

Example 10-45 Using the ASMCMD lsof command

ASMCMD [+] > lsof -G data
DB_Name  Instance_Name  Path                                          
orcl     orcl           +data/orcl/controlfile/current.260.691577263  
orcl     orcl           +data/orcl/datafile/example.265.691577295     
orcl     orcl           +data/orcl/datafile/sysaux.257.691577149      
orcl     orcl           +data/orcl/datafile/system.256.691577149      
orcl     orcl           +data/orcl/datafile/undotbs1.258.691577151    
orcl     orcl           +data/orcl/datafile/users.259.691577151       
orcl     orcl           +data/orcl/onlinelog/group_1.261.691577267    
orcl     orcl           +data/orcl/onlinelog/group_2.262.691577271    
orcl     orcl           +data/orcl/onlinelog/group_3.263.691577275    
orcl     orcl           +data/orcl/tempfile/temp.264.691577287 

ASMCMD [+] > lsof -C +ASM 
DB_Name  Instance_Name  Path
asmvol   +ASM           +data/VOLUME1.271.679226013
asmvol   +ASM           +data/VOLUME2.272.679227351