List File Events

0 Likes

NSS volumes keep track of files that have changed during an interval called an Epoch. The file list was originally called a Modified File List (MFL). However, the MFL did not account for changes to metadata. The MFL has been deprecated and the EFL (Event File List) is the current way to track changed files, which includes changes to metadata. This perl script uses the listFileEvents API to list the modified files.




This tool will print a list of files on an NSS volume that have changed during a specified EFL Epoch. It uses the Virtual File Services (Originally called Virtual File Services for NetWare) which were ported over to Linux. The SDK for this API set can be downloaded from http://developer.novell.com/wiki/index.php/Virtual_File_Services_for_NetWare. The objective of the tool is to add a trustee to a file using XML as specified in the VFS for NetWare specification. It is intended to be used as a sample script for developers that may want to use the VFS API set to view and manage storage.



How to Use the file:

linuxListFileEvents.pl is a Perl Script. So Perl must be installed and running on the Linux server that this file is being loaded on. NSS must be installed to get the VFS support. RELATED: Other EFL Utilities include linuxListEpochs, linuxStartEventEpoch, linuxStoptEventEpoch, and linuxListAllFiles.



To run the perl script type:

perl linuxListFileEvents.pl VOLUME_NAME <enter>

Where VOLUME_NAME is the name of the NSS volume where the active EFL Epoch is to be stopped.



The user will be prompted to type in one of the 37 digit Epoch Numbers displayed above the prompt. Type in one of the active Epochs or the utility will fail, then press enter.



Example: perl linuxListFileEvents.pl VOL1 <enter>



A sample output would be the following:



grep57:/a # perl linuxListFileEvents.pl NSS1
file is now open </_admin/Manage_NSS/Volume/NSS1/FileEvents.xml
<nssRequest><fileEventList><listEpochs/></fileEventList></nssRequest>
<nssReply>
<fileEventList>
<listEpochs>
<activeEpochs>
<epoch value="4468a904-7f08-01db-80-00-993f4a82c9da"/>
</activeEpochs>
<usedEpochs>
<epoch value="e5d831be-7680-01db-80-00-bd1cd5b47e57"/>
<epoch value="4468a904-7f08-01db-80-00-993f4a82c9da"/>
</usedEpochs>
<result value="0"><description>success</description></result>
</listEpochs>
</fileEventList>
</nssReply>



Choose an epoch and type in the complete 37 letter code including dashes.


4468a904-7f08-01db-80-00-993f4a82c9da
</_admin/Manage_NSS/Volume/NSS1/FileEvents.xml
<nssRequest><fileEventList><listFileEvents epochNumber="4468a904-7f08-01db-80-00-993f4a82c9da"/></fileEventList></nssRequest>
<nssReply>
<fileEventList>
<listFileEvents>
<file><action>2</action><name><![CDATA[\filecheck.pl]]></name><id1>144</id1><id2>30379</id2><id3>1412</id3><modifiedTime>20061117141937</modifiedTime><size>879</size></file>
<file><action>2</action><name><![CDATA[\linuxListEpochs.pl]]></name><id1>145</id1><id2>30379</id2><id3>1480</id3><modifiedTime>20061117141938</modifiedTime><size>1705</size></file>
<file><action>2</action><name><![CDATA[\linuxListFileEvents.pl]]></name><id1>146</id1><id2>30379</id2><id3>1560</id3><modifiedTime>20061117141938</modifiedTime><size>1713</size></file>
<file><action>2</action><name><![CDATA[\linuxStartEventEpoch.pl]]></name><id1>147</id1><id2>30379</id2><id3>1648</id3><modifiedTime>20061117141938</modifiedTime><size>1711</size></file>
<file><action>2</action><name><![CDATA[\linuxStopEventEpoch.pl]]></name><id1>148</id1><id2>30379</id2><id3>1736</id3><modifiedTime>20061117141938</modifiedTime><size>2067</size></file>
<file><action>1</action><name><![CDATA[\file1.txt]]></name><realName><![CDATA[\file1.txt]]></realName><id1>150</id1><id2>30379</id2><id3>1824</id3><modifiedTime>20061128111157</modifiedTime><size>0</size></file>
<file><action>1</action><name><![CDATA[\file2.txt]]></name><realName><![CDATA[\file2.txt]]></realName><id1>151</id1><id2>30379</id2><id3>1884</id3><modifiedTime>20061128111203</modifiedTime><size>0</size></file>
<result value="0"><description>zOK</description></result>
</listFileEvents>
</fileEventList>
</nssReply>



The specifications explain the XML tags.



Labels:

How To-Best Practice
Collateral
Comment List
Anonymous
Related Discussions
Recommended