Describing participation in the project to upgrade VoIP carrier Part 1 and Part 2 , one of the tasks that fell out of sight was the creation of a unified tool for visualizing and monitoring the operation of the Asterisk server. In fact, after leaving this project, the obsession to bring the display of Asterisk information to a more convenient form resulted in a project to create a prototype of a unified virtual file system that combines the capabilities of all the disparate tools available in Asterisk.
I think that many of the administrators who dealt with Asterisk were often surprised at the number of different teams with which data could be obtained from Asterisk. The discussion will focus on user accounts for subscriber devices, users for authentication, channels, as well as non-standard use of virtual file systems.
Let us dwell on various methods of obtaining data.
The first is the most common.
asterisk-macomnet*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime 6001 (Unspecified) D Auto (No) No 0 Unmonitored person/person (Unspecified) D Auto (No) No 0 UNKNOWN 3 sip peers [Monitored: 0 online, 1 offline Unmonitored: 1 online, 1 offline]
asterisk-macomnet*CLI> sip show peer 6001 * Name : 6001 Description : Realtime peer: No Secret : <Set> MD5Secret : <Not set> Remote Secret: <Not set> Context : web Record On feature : automon Record Off feature : automon Subscr.Cont. : <Not set> Language : ru Tonezone : <Not set> AMA flags : Unknown Transfer mode: open CallingPres : Presentation Allowed, Not Screened Callgroup : Pickupgroup : Named Callgr : Nam. Pickupgr: MOH Suggest : Mailbox : VM Extension : asterisk LastMsgsSent : 0/0 Call limit : 0 Max forwards : 0 Dynamic : Yes Callerid : "6001" <6001> MaxCallBR : 384 kbps Expire : -1 Insecure : no Force rport : Auto (No) Symmetric RTP: No ACL : No DirectMedACL : No T.38 support : No T.38 EC mode : Unknown T.38 MaxDtgrm: 4294967295 DirectMedia : No PromiscRedir : No User=Phone : No Video Support: No Text Support : No Ign SDP ver : No Trust RPID : No Send RPID : No Path support : No Path : N/A TrustIDOutbnd: Legacy Subscriptions: Yes Overlap dial : No DTMFmode : rfc2833 Timer T1 : 500 Timer B : 32000 ToHost : Addr->IP : (null) Defaddr->IP : (null) Prim.Transp. : UDP Allowed.Trsp : UDP,WS Def. Username: SIP Options : (none) Codecs : (gsm|g729|ulaw|alaw) Auto-Framing : No Status : Unmonitored Useragent : Reg. Contact : Qualify Freq : 60000 ms Keepalive : 0 ms Sess-Timers : Accept Sess-Refresh : uas Sess-Expires : 1800 secs Min-Sess : 90 secs RTP Engine : asterisk Parkinglot : Use Reason : No Encryption : Yes
asterisk-macomnet*CLI> sip show users Username Secret Accountcode Def.Context ACL Forcerport 6001 MegaPass12345 web No No person E346fz8Vam users_context No No asterisk-macomnet*CLI> sip show user 6001 * Name : 6001 Secret : <Set> MD5Secret : <Not set> Context : web Language : ru AMA flags : Unknown Tonezone : <Not set> Transfer mode: open MaxCallBR : 384 kbps CallingPres : Presentation Allowed, Not Screened Call limit : 0 Callgroup : Pickupgroup : Named Callgr : Nam. Pickupgr: Callerid : "6001" <6001> ACL : No Sess-Timers : Accept Sess-Refresh : uas Sess-Expires : 1800 secs Sess-Min-SE : 90 secs RTP Engine : asterisk Auto-Framing: No
Is not it familiar teams? And many use them almost daily. It's probably not a secret for anyone that Asterisk has a tree of objects. Access to it is provided through providers. The information in the tree is fuller than we have seen before.
asterisk-macomnet*CLI> data show providers /asterisk/channel/iax2/peers (get) [chan_iax2.c] /asterisk/channel/iax2/users (get) [chan_iax2.c] /asterisk/channel/dahdi/version (get) [chan_dahdi.c] /asterisk/channel/dahdi/status (get) [chan_dahdi.c] /asterisk/channel/dahdi/channels (get) [chan_dahdi.c] /asterisk/channel/sip/peers (get) [chan_sip.c] /asterisk/core/hints (get) [pbx.c] /asterisk/core/channels (get) [channel.c] /asterisk/core/channeltypes (get) [channel.c] /asterisk/application/queue/list (get) [app_queue.c]
Access to the object tree allows you to have complete information about each of them.
asterisk-macomnet*CLI> data get /asterisk/channel/sip/peers peers peer vmexten: "asterisk" is_realtime: False amaflags text: "Unknown" value: 0 transports: "UDP,WS" inuse: 0 timer_t1: 500 callingpres text: "Presentation Allowed, Not Screened" value: 0 unsolicited_mailbox: "" host_dynamic: True subscribecontext: "" useragent: "" rtptimeout: 0 cid_num: "6001" mohinterpret: "default" parkinglot: "" mwi_from: "" call_limit: 0 fullcontact: "" rtpholdtimeout: 0 qualifyfreq: 60000 maxms: 0 rtpkeepalive: 0 allowtransfer text: "open" value: 0 regexten: "" onhold: 0 ringing: 0 fromdomain: "" timer_b: 32000 fromuser: "" username: "" secret: "MegaPass12345" accountcode: "" t38_maxdatagram: -1 remotesecret: "" md5secret: "" maxcallbitrate: 384 mohsuggest: "" lastms: 0 sipoptions sec_agree: False histinfo: False join: False resource-priority: False precondition: False eventlist: False outbound: False recipient-list-invite: False early-session: False recipient-list-subscribe: False sdp-anat: False 100rel: False replaces: False from-change: False replace: False gruu: False tdialog: False privacy: False norefersub: False timer: False path: False pref: False tohost: "" autoframing: False name: "6001" cid_name: "6001" language: "ru" context: "web" description: "" type: "friend" engine: "asterisk" codecs codec frame_length: 33 samplespersecond: 8000 name: "gsm" description: "GSM" codec frame_length: 10 samplespersecond: 8000 name: "g729" description: "G.729A" codec frame_length: 80 samplespersecond: 8000 name: "ulaw" description: "G.711 u-law" codec frame_length: 80 samplespersecond: 8000 name: "alaw" description: "G.711 a-law" peer vmexten: "asterisk" is_realtime: False amaflags text: "Unknown" value: 0 transports: "UDP,WS" inuse: 0 timer_t1: 500 callingpres text: "Presentation Allowed, Not Screened" value: 0 unsolicited_mailbox: "" host_dynamic: True subscribecontext: "" useragent: "" rtptimeout: 0 cid_num: "person" mohinterpret: "default" parkinglot: "" mwi_from: "" call_limit: 0 fullcontact: "" rtpholdtimeout: 0 qualifyfreq: 60000 maxms: 2000 rtpkeepalive: 0 allowtransfer text: "open" value: 0 regexten: "" onhold: 0 ringing: 0 fromdomain: "" timer_b: 32000 fromuser: "" username: "person" secret: "E346fz8Vam" accountcode: "" t38_maxdatagram: -1 remotesecret: "" md5secret: "" maxcallbitrate: 384 mohsuggest: "" lastms: 0 sipoptions sec_agree: False histinfo: False join: False resource-priority: False precondition: False eventlist: False outbound: False recipient-list-invite: False early-session: False recipient-list-subscribe: False sdp-anat: False 100rel: False replaces: False from-change: False replace: False gruu: False tdialog: False privacy: False norefersub: False timer: False path: False pref: False tohost: "" autoframing: False name: "person" cid_name: "person" language: "en" context: "users_context" description: "" type: "friend" engine: "asterisk" codecs codec frame_length: 33 samplespersecond: 8000 name: "gsm" description: "GSM" codec frame_length: 10 samplespersecond: 8000 name: "g729" description: "G.729A" codec frame_length: 80 samplespersecond: 8000 name: "ulaw" description: "G.711 u-law" codec frame_length: 80 samplespersecond: 8000 name: "alaw" description: "G.711 a-law"
Probably few people know, due to the lack of normal documentation for the "data get" command, but there is a search and grouping of fields in it.
asterisk-macomnet*CLI> data get /asterisk/channel/sip/peers peers/peer/name=6001 asterisk-macomnet*CLI> data get /asterisk/channel/sip/peers peers/peer/secret=MegaPass12345 peers peer vmexten: "asterisk" is_realtime: False amaflags text: "Unknown" value: 0 transports: "UDP,WS" inuse: 0 timer_t1: 500 callingpres text: "Presentation Allowed, Not Screened" value: 0 unsolicited_mailbox: "" host_dynamic: True subscribecontext: "" useragent: "" rtptimeout: 0 cid_num: "6001" mohinterpret: "default" parkinglot: "" mwi_from: "" call_limit: 0 fullcontact: "" rtpholdtimeout: 0 qualifyfreq: 60000 maxms: 0 rtpkeepalive: 0 allowtransfer text: "open" value: 0 regexten: "" onhold: 0 ringing: 0 fromdomain: "" timer_b: 32000 fromuser: "" username: "" secret: "MegaPass12345" accountcode: "" t38_maxdatagram: -1 remotesecret: "" md5secret: "" maxcallbitrate: 384 mohsuggest: "" lastms: 0 sipoptions sec_agree: False histinfo: False join: False resource-priority: False precondition: False eventlist: False outbound: False recipient-list-invite: False early-session: False recipient-list-subscribe: False sdp-anat: False 100rel: False replaces: False from-change: False replace: False gruu: False tdialog: False privacy: False norefersub: False timer: False path: False pref: False tohost: "" autoframing: False name: "6001" cid_name: "6001" language: "ru" context: "web" description: "" type: "friend" engine: "asterisk" codecs codec frame_length: 33 samplespersecond: 8000 name: "gsm" description: "GSM" codec frame_length: 10 samplespersecond: 8000 name: "g729" description: "G.729A" codec frame_length: 80 samplespersecond: 8000 name: "ulaw" description: "G.711 u-law" codec frame_length: 80 samplespersecond: 8000 name: "alaw" description: "G.711 a-law"
Querying data from the tree supports filtering parameters. In this case, the search parameter must have the value "1 = 1"; any other search condition described above is ignored automatically.
asterisk-macomnet*CLI> data get /asterisk/channel/sip/peers 1=1 peers/peer/cid_num,peers/peer/name,peers/peer/username,peers/peer/secret,peers/peer/lastms,peers/peer/fullcontact peers peer cid_num: "6001" fullcontact: "sip:6001@192.168.200.247:5060" username: "" secret: "MegaPass12345" lastms: 0 name: "6001" peer cid_num: "person" fullcontact: "" username: "person" secret: "E346fz8Vam" lastms: 0 name: "person"
Access to the tree is very convenient, but the default tree contains only entries that are hard-coded in the configuration files or entries of cached realtime connections. To get a full-fledged tree, you need to load all the parameters of all realtime connections from the database.
Displaying real-time peers is done with the command:
asterisk-macomnet*CLI> sip show peer <name> load Usage: sip show peer <name> [load] Shows all details on one SIP peer and the current status. Option "load" forces lookup of peer in realtime storage.
Unfortunately, in order to download data, you need to know what to download.
asterisk-macomnet*CLI> realtime load sippeers name zhecka Usage: realtime load <family> <colmatch> <value> Prints out a list of variables using the RealTime driver. You must supply a family name, a column to match on, and a value to match to.
As we see here, to download realtime connection data you also need to know what to load. But there is a dirty hack. The "colmatch" and "value" parameters are transferred to the sql provider "as is". Therefore, you can make a request of the form "realtime load sippeers 1 1" and get all the data in one request.
asterisk-macomnet*CLI> realtime load sippeers 1 1 Column Name Column Value -------------------- -------------------- dtlssetup actpass id 1325 name zhecka ipaddr port 0 regseconds 0 defaultuser zhecka fullcontact regserver useragent lastms 0 host dynamic type friend context web permit deny secret zhecka md5secret remotesecret transport udp,tcp dtmfmode directmedia no nat callgroup pickupgroup language disallow allow insecure trustrpid progressinband promiscredir useclientcode accountcode setvar callerid amaflags callcounter busylevel allowoverlap allowsubscribe videosupport maxcallbitrate rfc2833compensate mailbox session-timers session-expires session-minse session-refresher t38pt_usertpsource regexten fromdomain fromuser qualify defaultip rtptimeout rtpholdtimeout sendrpid outboundproxy callbackextension timert1 timerb qualifyfreq constantssrc contactpermit contactdeny usereqphone textsupport faxdetect buggymwi auth fullname trunkname cid_number callingpres mohinterpret mohsuggest parkinglot hasvoicemail subscribemwi vmexten autoframing rtpkeepalive call-limit g726nonstandard ignoresdpversion allowtransfer dynamic path supportpath encryption no avpf yes force_avp yes icesupport yes dtlsenable yes dtlsverify fingerprint dtlscertfile /usr/local/share/asterisk/keys/cert.crt dtlsprivatekey /usr/local/share/asterisk/keys/private.pem dtlscafile /usr/local/share/asterisk/keys/ca.crt dtlssetup actpass id 1327 name zhecka1 ipaddr port regseconds defaultuser zhecka1 fullcontact regserver useragent lastms host dynamic type friend context web permit deny secret md5secret remotesecret transport ws dtmfmode directmedia no nat callgroup pickupgroup language disallow allow insecure trustrpid progressinband promiscredir useclientcode accountcode setvar callerid amaflags callcounter busylevel allowoverlap allowsubscribe videosupport maxcallbitrate rfc2833compensate mailbox session-timers session-expires session-minse session-refresher t38pt_usertpsource regexten fromdomain fromuser qualify defaultip rtptimeout rtpholdtimeout sendrpid outboundproxy callbackextension timert1 timerb qualifyfreq constantssrc contactpermit contactdeny usereqphone textsupport faxdetect buggymwi auth fullname trunkname cid_number callingpres mohinterpret mohsuggest parkinglot hasvoicemail subscribemwi vmexten autoframing rtpkeepalive call-limit g726nonstandard ignoresdpversion allowtransfer dynamic path supportpath encryption yes avpf yes force_avp yes icesupport yes dtlsenable yes dtlsverify fingerprint dtlscertfile /usr/local/share/asterisk/keys/cert.crt dtlsprivatekey /usr/local/share/asterisk/keys/private.pem dtlscafile /usr/local/share/asterisk/keys/ca.crt dtlssetup actpass
This query will show all realtime peers that are available in the database.
Next, you need to execute the command by the name of each peer.
asterisk-macomnet*CLI> sip show peer zhecka load * Name : zhecka Description : Realtime peer: Yes, cached Secret : <Set> MD5Secret : <Not set> Remote Secret: <Not set> Context : web Record On feature : automon Record Off feature : automon Subscr.Cont. : <Not set> Language : ru Tonezone : <Not set> AMA flags : Unknown Transfer mode: open CallingPres : Presentation Allowed, Not Screened Callgroup : Pickupgroup : Named Callgr : Nam. Pickupgr: MOH Suggest : Mailbox : VM Extension : asterisk LastMsgsSent : 0/0 Call limit : 0 Max forwards : 0 Dynamic : Yes Callerid : "" <> MaxCallBR : 384 kbps Expire : 120 Insecure : no Force rport : Auto (No) Symmetric RTP: No ACL : No DirectMedACL : No T.38 support : No T.38 EC mode : Unknown T.38 MaxDtgrm: 4294967295 DirectMedia : No PromiscRedir : No User=Phone : No Video Support: No Text Support : No Ign SDP ver : No Trust RPID : No Send RPID : No Path support : No Path : N/A TrustIDOutbnd: Legacy Subscriptions: Yes Overlap dial : No DTMFmode : rfc2833 Timer T1 : 500 Timer B : 32000 ToHost : Addr->IP : (null) Defaddr->IP : (null) Prim.Transp. : UDP Allowed.Trsp : UDP,TCP Def. Username: zhecka SIP Options : (none) Codecs : (ulaw|alaw|gsm|h263) Auto-Framing : No Status : Unmonitored Useragent : Reg. Contact : Qualify Freq : 60000 ms Keepalive : 0 ms Sess-Timers : Accept Sess-Refresh : uas Sess-Expires : 1800 secs Min-Sess : 90 secs RTP Engine : asterisk Parkinglot : Use Reason : No Encryption : No
After these operations, the realtime entry "zhecka", currently in offline, appears in the internal data tree.
asterisk-macomnet*CLI> data get /asterisk/channel/sip/peers 1=1 peers/peer/cid_num,peers/peer/name,peers/peer/username,peers/peer/secret,peers/peer/lastms,peers/peer/fullcontact peers peer cid_num: "" fullcontact: "" username: "zhecka" secret: "zhecka" lastms: 4294967295 name: "zhecka" peer cid_num: "6001" fullcontact: "" username: "" secret: "MegaPass12345" lastms: 0 name: "6001" peer cid_num: "person" fullcontact: "" username: "person" secret: "E346fz8Vam" lastms: 0 name: "person"
As can be seen from the presented sequence, in order to obtain data, it is necessary to perform several different operations for each base of the peer available in realtime.
Probably many of you will say: "There is REST! ββUse it!"
I will answer: "Yes. REST is. But it is weak and does not give the necessary information"
Output REST request http: // localhost: 8088 / ari / endpoints / SIP
[ { "technology": "SIP", "resource": "person", "state": "unknown", "channel_ids": [] }, { "technology": "SIP", "resource": "mtrf", "state": "unknown", "channel_ids": [] }, { "technology": "SIP", "resource": "6001", "state": "unknown", "channel_ids": [] } ]
Unfortunately, the required fields are missing in the output and you need to rewrite or add the REST module to add them.
So what is offered? And it is proposed to transfer the Asterisk tree to the file system in the manner of devfs / procfs and track all settings in one place.
It looks like this.
# tree /mnt /mnt βββ config -> /usr/local/etc/asterisk βββ peers β βββ iax2 β β βββ corbina β β β βββ full β β βββ msm β β βββ full β βββ sip β βββ _offline β β βββ mtrf -> ../mtrf β βββ _online β βββ mtrf β βββ codecs β βββ contexts β βββ credentials β βββ full β βββ huntgroups βββ users βββ iax2 β βββ macomnet β βββ full βββ sipfriends β βββ 6001 β β βββ codecs β β βββ contexts β β βββ credentials β β βββ full β β βββ huntgroups β βββ _offline β β βββ 6001 -> ../6001 β β βββ person -> ../person β βββ _online β β βββ zhecka -> ../zhecka β βββ person β β βββ codecs β β βββ contexts β β βββ credentials β β βββ full β β βββ huntgroups β βββ zhecka β βββ codecs β βββ contexts β βββ credentials β βββ full β βββ huntgroups βββ sipusers βββ _offline β βββ zhecka1 -> ../zhecka1 βββ _online βββ zhecka1 βββ codecs βββ contexts βββ credentials βββ full βββ huntgroups
This is a real cast of the Asterisk test server file system. Since we are not limited in formatting the output data, the output of the parameters for the connection will look like this.
# cat /mnt/users/sipfriends/_online/zhecka/credentials name=zhecka username=zhecka secret=zhecka md5secret= fromuser= fromdomain= cid_name= remotesecret= fullcontact=sip:zhecka@10.6.207.135:64802;transport=udp;rinstance=d42eec40501a7c4d useragent=Bria release 2.5 RC4 stamp 47242 regexten= transports=UDP,TCP
Or contexts
# cat /mnt/users/sipfriends/_online/zhecka/contexts context=web subscribecontext=
All this data is obtained in real time, well, or with minimal delay in the processing of Asterisk Events, during the disconnection / connection of the device.
How it works? AstFS is written in Python and uses the Fuse library.
The Fuse library allows for each corresponding event (open, readdir, getattr, close, etc.) coming from the file system, to call the procedure that processes the incoming and generates the end user data.
Since the Fuse library, like most event-based libraries, has an internal loop, it is rather difficult to transfer data from an external program to it. You need a common object or pipe to work.
From the point of view of using a TCP / UDP socket pipe or something similar, in the event of a server or daemon failure providing data delivery, the request to the file system will hang uncontrollably. Again, because of its own internal loop, the library cannot be correctly implemented in asynchronous twisted frameworks (I did not succeed at least). Attempt to start everything through Threading caused a lot of different problems and had to abandon this idea. Calling the connection from the procedures directly to Asterisk caused the wildest overhead, since for each "sneeze" it was necessary to open a new connection to AMI.
The only more or less normal solution was the separation of the process serving requests to the file system and the process receiving data from Asterisk using multiprocessing . This component has the ability to control generated processes, as well as there are objects that can be "fumbled" between processes.
Thus, the system consists of three processes:
Between them, a common dictionary is "fumbled" packed in JSON. The fact is that common objects have a structure different from python structures and are not compatible with them. When updating data from Asterisk, this dictionary is unpacked, updated and packed back.
Accordingly, the process serving requests from the file system, if necessary, unpacks the dictionary and generates final data for the user.
The AstFS source code contains all the necessary classes and an example for creating a virtual file system. The code is certainly far from ideal, but will be modified for the better if possible (there are comments in Russian).
The focus was on the flexibility of the file system structure.
By flexibility is meant that either a class or a function or just static data can be used as a handler for a branch of a tree or file.
The definition of a tree is quite simple:
root = { 'helpfilefunc': [fsstruct.stat_info['file'], fusefscore.returnhelp], 'link_to_tmp': [fsstruct.stat_info['link'], '/tmp'], 'staticfile': [fsstruct.stat_info['file'], 'contents of staticfile'], 'customchmodfile': [{'st_mode': 0x8000 | int('0600', 8), 'st_uid': 0, 'st_gid': 0}, 'contents of customchmodfile'], 'nulldir': {}, 'nullfile': [{}, ''], 'demotreeclass': fsstruct.BasicTree('/demotreeclass', mpd, ''), 'tree': {'peer': [{'st_mode': 0x8000 | int('0644', 8)}, 'contents of peer'], 'friend': {}, 'user': {}} }
# tree -ghpu /mnt/ /mnt/ βββ [-rw------- root wheel 27] customchmodfile βββ [drwxr-xr-x asterisk asterisk 512] demotreeclass β βββ [-rw-r--r-- asterisk asterisk 12] help β βββ [-rw-r--r-- asterisk asterisk 12] info βββ [-rw-r--r-- asterisk asterisk 33] helpfilefunc βββ [lrwxr-xr-x asterisk asterisk 4] link_to_tmp -> /tmp βββ [drwxr-xr-x asterisk asterisk 512] nulldir βββ [-rw-r--r-- asterisk asterisk 0] nullfile βββ [-rw-r--r-- asterisk asterisk 22] staticfile βββ [drwxr-xr-x asterisk asterisk 512] tree βββ [drwxr-xr-x asterisk asterisk 512] friend βββ [-rw-r--r-- asterisk asterisk 16] peer βββ [drwxr-xr-x asterisk asterisk 512] user 6 directories, 7 files
If you need to define a file, then simply set the array (list) consisting of two parameters. The first is the type of file and access rights to it, the second is either the static content of the file, or the name of the function returning the contents of the file. If you need to define a directory, then simply define a dictionary (dict) containing in turn either a list of files or a list of directories. When determining the directory in which the dynamically changeable structure is located, you can specify a subclass that will handle all file system requests.
In fact, for a basic functional in a class, it suffices to describe 4 methods:
Let us dwell on the implementation features.
getattr is called to determine the type of file or directory, returns only attributes! No other information from this method is obtained.
readdir is called when opening a directory and requesting files, returns only a list of files located in a directory with no attributes!
With the usual call of the file list
# ls /mnt customchmodfile demotreeclass helpfilefunc link_to_tmp nulldir nullfile staticfile tree
the following sequence occurs
2017-03-14 13:13:04,559 - DEBUG - [FuseFSCore.getattr] path / fh None. Context: {'gid': 0, 'pid': 99276, 'uid': 0} 2017-03-14 13:13:04,559 - DEBUG - [FuseFSCore.returntree] Instance Dict > retdict: {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} 2017-03-14 13:13:04,560 - DEBUG - [FuseFSCore.getattr] Found data {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} for path / 2017-03-14 13:13:04,560 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object / is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 9, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:13:04,561 - DEBUG - [FuseFSCore.statfs] Request FileSystem Info. Context: {'gid': 0, 'pid': 99276, 'uid': 0} 2017-03-14 13:13:04,561 - DEBUG - [FuseFSCore.readdir] Path /:0. Context: {'gid': 0, 'pid': 99276, 'uid': 0} 2017-03-14 13:13:04,562 - DEBUG - [FuseFSCore.returntree] Instance Dict > retdict: {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} 2017-03-14 13:13:04,562 - DEBUG - [FuseFSCore.readdir] Found data {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} for path / 2017-03-14 13:13:04,562 - DEBUG - [FuseFSCore.readdir] SrcTree: {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []}, DirTree: <type 'dict'>:{'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []}
Let's try to open the file
2017-03-14 13:26:45,137 - DEBUG - [FuseFSCore.open] /staticfile:0. Context: {'gid': 0, 'pid': 99297, 'uid': 0} 2017-03-14 13:26:45,138 - DEBUG - [FuseFSCore.getattr] path /staticfile fh None. Context: {'gid': 0, 'pid': 99297, 'uid': 0} 2017-03-14 13:26:45,139 - DEBUG - [FuseFSCore.returntree] Instance List > itemstat:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,139 - DEBUG - [FuseFSCore.returntree] data: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] 2017-03-14 13:26:45,140 - DEBUG - [FuseFSCore.getattr] Found data [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] for path /staticfile 2017-03-14 13:26:45,140 - DEBUG - [FuseFSCore.getattr] List <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 22, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,140 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /staticfile is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 22, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,141 - DEBUG - [FuseFSCore.read] read file /staticfile:4096:0. Context: {'gid': 0, 'pid': 99297, 'uid': 0} 2017-03-14 13:26:45,141 - DEBUG - [FuseFSCore.returntree] Instance List > itemstat:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,142 - DEBUG - [FuseFSCore.returntree] data: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] 2017-03-14 13:26:45,142 - DEBUG - [FuseFSCore.read] dirtree data [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] for path /staticfile 2017-03-14 13:26:45,142 - DEBUG - [FuseFSCore.read] FoundTree: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] 2017-03-14 13:26:45,143 - DEBUG - [FuseFSCore.read] read file /staticfile:4096:22. Context: {'gid': 0, 'pid': 99297, 'uid': 0} 2017-03-14 13:26:45,143 - DEBUG - [FuseFSCore.returntree] Instance List > itemstat:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,143 - DEBUG - [FuseFSCore.returntree] data: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] 2017-03-14 13:26:45,143 - DEBUG - [FuseFSCore.read] dirtree data [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] for path /staticfile 2017-03-14 13:26:45,144 - DEBUG - [FuseFSCore.read] FoundTree: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] 2017-03-14 13:26:45,144 - DEBUG - [FuseFSCore.truncate] /staticfile:22:None. Context: {'gid': 0, 'pid': 99297, 'uid': 0} 2017-03-14 13:26:45,144 - DEBUG - [FuseFSCore.getattr] path /staticfile fh None. Context: {'gid': 0, 'pid': 99297, 'uid': 0} 2017-03-14 13:26:45,144 - DEBUG - [FuseFSCore.returntree] Instance List > itemstat:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,144 - DEBUG - [FuseFSCore.returntree] data: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] 2017-03-14 13:26:45,145 - DEBUG - [FuseFSCore.getattr] Found data [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, 'contents of staticfile'] for path /staticfile 2017-03-14 13:26:45,145 - DEBUG - [FuseFSCore.getattr] List <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 22, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,145 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /staticfile is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 33188, 'st_dev': 0, 'st_size': 22, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:26:45,145 - DEBUG - [FuseFSCore.release] /staticfile:0. Context: {'gid': 0, 'pid': 99297, 'uid': 0}
.
. ?
/mnt/demotreeclass ,
fsstruct.BasicTree .
2017-03-14 13:29:16,819 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99300, 'uid': 0} 2017-03-14 13:29:16,819 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:29:16,819 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:29:16,820 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:29:16,820 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:29:16,820 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:29:16,821 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:29:16,821 - DEBUG - [FuseFSCore.statfs] Request FileSystem Info. Context: {'gid': 0, 'pid': 99300, 'uid': 0} 2017-03-14 13:29:16,822 - DEBUG - [FuseFSCore.readdir] Path /demotreeclass:0. Context: {'gid': 0, 'pid': 99300, 'uid': 0} 2017-03-14 13:29:16,822 - DEBUG - [FuseFSCore.readdir] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:29:16,822 - DEBUG - [BasicTree._readdir] path len 1, path [''] 2017-03-14 13:29:16,822 - DEBUG - [BasicTree._readdir] return full tree {'info': {}, 'help': {}} 2017-03-14 13:29:16,822 - DEBUG - [FuseFSCore.readdir] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'info': {}, 'help': {}} 2017-03-14 13:29:16,822 - DEBUG - [FuseFSCore.readdir] SrcTree: <astfs.fsstruct.BasicTree object at 0x8058fe210>, DirTree: <type 'dict'>:{'info': {}, 'help': {}}
, , , , β . .
-
# ls -al /mnt/demotreeclass total 2 drwxr-xr-x 1 asterisk asterisk 512 14 11:10 . drwxr-xr-x 9 asterisk asterisk 512 14 11:10 .. -rw-r--r-- 1 asterisk asterisk 12 14 11:10 help -rw-r--r-- 1 asterisk asterisk 12 14 11:10 info
2017-03-14 13:40:46,539 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,540 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,540 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:40:46,540 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:40:46,540 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,541 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,541 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,541 - DEBUG - [FuseFSCore.statfs] Request FileSystem Info. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,542 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,542 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,542 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:40:46,542 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:40:46,543 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,543 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,543 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,543 - DEBUG - [FuseFSCore.readdir] Path /demotreeclass:0. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,544 - DEBUG - [FuseFSCore.readdir] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,544 - DEBUG - [BasicTree._readdir] path len 1, path [''] 2017-03-14 13:40:46,544 - DEBUG - [BasicTree._readdir] return full tree {'info': {}, 'help': {}} 2017-03-14 13:40:46,544 - DEBUG - [FuseFSCore.readdir] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'info': {}, 'help': {}} 2017-03-14 13:40:46,545 - DEBUG - [FuseFSCore.readdir] SrcTree: <astfs.fsstruct.BasicTree object at 0x8058fe210>, DirTree: <type 'dict'>:{'info': {}, 'help': {}} 2017-03-14 13:40:46,545 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,545 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,545 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:40:46,546 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:40:46,546 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,546 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,546 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,546 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,547 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,547 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:40:46,547 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:40:46,547 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,547 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,548 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,548 - DEBUG - [FuseFSCore.getattr] path / fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,548 - DEBUG - [FuseFSCore.returntree] Instance Dict > retdict: {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} 2017-03-14 13:40:46,548 - DEBUG - [FuseFSCore.getattr] Found data {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} for path / 2017-03-14 13:40:46,549 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object / is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 9, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,549 - DEBUG - [FuseFSCore.getattr] path / fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,549 - DEBUG - [FuseFSCore.returntree] Instance Dict > retdict: {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} 2017-03-14 13:40:46,549 - DEBUG - [FuseFSCore.getattr] Found data {'nullfile': [], 'demotreeclass': [], '__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}], 'link_to_tmp': [], 'helpfilefunc': [], 'tree': [], 'nulldir': [], 'customchmodfile': [], 'staticfile': []} for path / 2017-03-14 13:40:46,549 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object / is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 9, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,550 - DEBUG - [FuseFSCore.getattr] path /demotreeclass/info fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,550 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass/info 2017-03-14 13:40:46,550 - DEBUG - [BasicTree._getattr] started for path info 2017-03-14 13:40:46,550 - DEBUG - [BasicTree._getattr] path len 1, path ['info'] 2017-03-14 13:40:46,550 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 0, 'st_ino': 0, 'st_uid': 931, 'st_mode': 33188, 'st_atime': 1489479051}, <bound method BasicTree._getfile of <astfs.fsstruct.BasicTree object at 0x8058fe210>>] 2017-03-14 13:40:46,550 - DEBUG - [BasicTree._getfile] started for path info 2017-03-14 13:40:46,550 - DEBUG - [FuseFSCore.getattr] List <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 12, 'st_ino': 0, 'st_uid': 931, 'st_mode': 33188, 'st_atime': 1489479051} 2017-03-14 13:40:46,551 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass/info is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 12, 'st_ino': 0, 'st_uid': 931, 'st_mode': 33188, 'st_atime': 1489479051} 2017-03-14 13:40:46,551 - DEBUG - [FuseFSCore.getattr] path /demotreeclass/help fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,551 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass/help 2017-03-14 13:40:46,551 - DEBUG - [BasicTree._getattr] started for path help 2017-03-14 13:40:46,551 - DEBUG - [BasicTree._getattr] path len 1, path ['help'] 2017-03-14 13:40:46,552 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 0, 'st_ino': 0, 'st_uid': 931, 'st_mode': 33188, 'st_atime': 1489479051}, <bound method BasicTree._getfile of <astfs.fsstruct.BasicTree object at 0x8058fe210>>] 2017-03-14 13:40:46,552 - DEBUG - [BasicTree._getfile] started for path help 2017-03-14 13:40:46,552 - DEBUG - [FuseFSCore.getattr] List <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 12, 'st_ino': 0, 'st_uid': 931, 'st_mode': 33188, 'st_atime': 1489479051} 2017-03-14 13:40:46,552 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass/help is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 12, 'st_ino': 0, 'st_uid': 931, 'st_mode': 33188, 'st_atime': 1489479051} 2017-03-14 13:40:46,553 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,554 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,554 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:40:46,554 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:40:46,554 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,554 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,554 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051} 2017-03-14 13:40:46,554 - DEBUG - [FuseFSCore.getattr] path /demotreeclass fh None. Context: {'gid': 0, 'pid': 99321, 'uid': 0} 2017-03-14 13:40:46,555 - DEBUG - [FuseFSCore.getattr] Found data <astfs.fsstruct.BasicTree object at 0x8058fe210> for path /demotreeclass 2017-03-14 13:40:46,555 - DEBUG - [BasicTree._getattr] started for path 2017-03-14 13:40:46,555 - DEBUG - [BasicTree._getattr] path len 1, path [''] 2017-03-14 13:40:46,555 - DEBUG - [BasicTree._getattr] return full tree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,555 - DEBUG - [FuseFSCore.getattr] Object <astfs.fsstruct.BasicTree object at 0x8058fe210> return dirtree {'__dirstat__': [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}, '']} 2017-03-14 13:40:46,555 - DEBUG - [FuseFSCore.getattr] Attrstat Result for object /demotreeclass is <type 'dict'>:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_gid': 931, 'st_dev': 0, 'st_size': 512, 'st_ino': 0, 'st_uid': 931, 'st_mode': 16877, 'st_atime': 1489479051}
, , .
, , . "" .
(symlink)
# ls /mnt/link_to_tmp .ICE-unix aguilera.ulaw crontab.B0fGYRPx73~ macroform-the_simplicity.wav mycachedir pymp-Ri0pXJ pymp-eysf7M socket .X11-unix cachedir crontab.SyEoUZMExj~ manolo_camp-morning_coffee.ulaw mysql.sock pymp-SZfCWa pymp-hH6kLC treecache .XIM-unix crontab.1yo8gxs5HE~ errlog manolo_camp-morning_coffee.wav pymp-6oVKsj
2017-03-14 13:47:55,593 - DEBUG - [FuseFSCore.readlink] path: /link_to_tmp. Context: {'gid': 0, 'pid': 99341, 'uid': 0} 2017-03-14 13:47:55,594 - DEBUG - [FuseFSCore.returntree] Instance List > itemstat:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 41453, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:47:55,594 - DEBUG - [FuseFSCore.returntree] data: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 41453, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, '/tmp'] 2017-03-14 13:47:55,594 - DEBUG - [FuseFSCore.readlink] FoundTree: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 41453, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, '/tmp'] 2017-03-14 13:47:55,595 - DEBUG - [FuseFSCore.readlink] path: /link_to_tmp. Context: {'gid': 0, 'pid': 99341, 'uid': 0} 2017-03-14 13:47:55,595 - DEBUG - [FuseFSCore.returntree] Instance List > itemstat:{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 41453, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051} 2017-03-14 13:47:55,595 - DEBUG - [FuseFSCore.returntree] data: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 41453, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, '/tmp'] 2017-03-14 13:47:55,596 - DEBUG - [FuseFSCore.readlink] FoundTree: [{'st_ctime': 1489479051, 'st_mtime': 1489479051, 'st_nlink': 1, 'st_mode': 41453, 'st_dev': 0, 'st_size': 0, 'st_gid': 931, 'st_uid': 931, 'st_ino': 0, 'st_atime': 1489479051}, '/tmp']
:
?
, . . , "" . , "" .
. , .. . , . .
, . , , pipe - . , .
. , uid gid . , .. , , . , .
, - .
- β ?
PS: if someone missed the link to the project on github, here it is
Β© Aborche 2017
Source: https://habr.com/ru/post/323740/