[OmniOS-discuss] LX Zone DTrace

Mini Trader miniflowtrader at gmail.com
Sat Jan 14 15:02:35 UTC 2017


I just tried on CentOS same error.  The directory has to be from LOFS i.e.
a ZFS pool.

>From OmniOS can you output zfs get all zonefileset and /usr/bin/ls -lV
zonedirectory and share your results.

On Sat, Jan 14, 2017 at 9:35 AM, Natxo Asenjo <natxo.asenjo at gmail.com>
wrote:

> hi,
>
>
> On Sat, Jan 14, 2017 at 3:16 PM, Mini Trader <miniflowtrader at gmail.com>
> wrote:
>
>> Well the author at my request was able to remove the call to os.getcwd()
>> which allows the program to operate.
>>
>>
>> If anyone wants to tinker here is an example that will likely break on
>> someones system.  I don't know if this is an LX bug, libc bug, python bug
>> etc.
>>
>> # read a directory, stat all files
>>
>> import os
>> import sys
>> from stat import *
>>
>> def chdir(d):
>>     global cwdlist
>>
>>     if d != '.':
>>         os.chdir(d)
>>         if d == '..':
>>             cwdlist.pop()
>>         else:
>>             cwdlist.append(d)
>>         print repr('/'.join(cwdlist))
>>         # Comment the line below to allow things to run
>>         os.getcwd()
>>
>> def walk(d):
>>     chdir(d)
>>     dirlist = os.listdir('.')
>>     dirlist.sort()
>>     for f in dirlist:
>>         try:
>>             s = os.lstat(f)
>>             if S_ISDIR(s.st_mode):
>>                 walk(f)
>>         except OSError, err:
>>             print err
>>     chdir('..')
>>
>> if len(sys.argv) != 2:
>>     print 'need 1 arg, directory to scan'
>>
>> os.chdir(sys.argv[1])
>> cwd = os.getcwd()
>> cwdlist = cwd.split('/')
>>
>> walk('.')
>>
>>
> runs fine in a centos 6.8 container, no problem.
>
> I even have a couple of mount points with several thousand files and it
> walks everything without a hitch.
>
> --
> regards,
> Natxo
>
>
>
> _______________________________________________
> OmniOS-discuss mailing list
> OmniOS-discuss at lists.omniti.com
> http://lists.omniti.com/mailman/listinfo/omnios-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20170114/43e5a352/attachment.html>


More information about the OmniOS-discuss mailing list