Popular recipes tagged "device"http://code.activestate.com/recipes/tags/device/2016-12-23T18:05:41-08:00ActiveState Code RecipesGet disk partition information with psutil (cross-platform) (Python) 2016-12-23T18:05:41-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580737-get-disk-partition-information-with-psutil-cross-p/ <p style="color: grey"> Python recipe 580737 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/file_system/">file_system</a>, <a href="/recipes/tags/psutil/">psutil</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/system/">system</a>). </p> <p>This is a recipe that shows how to easily get disk partition information, in a cross-platform manner (for the supported OSes), from your computer's operating system, using the psutil library for Python.</p> Mounted devices (Batch) 2013-08-13T14:32:51-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578639-mounted-devices/ <p style="color: grey"> Batch recipe 578639 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/mount/">mount</a>). Revision 2. </p> <p>Script reads data stored in HKLM\SYSTEM\MountedDevices key and shows it in user friendly format. It's still under development.</p> NBD server in python (Python) 2011-02-08T20:59:23-08:00Dima Tisnekhttp://code.activestate.com/recipes/users/4068698/http://code.activestate.com/recipes/577569-nbd-server-in-python/ <p style="color: grey"> Python recipe 577569 by <a href="/recipes/users/4068698/">Dima Tisnek</a> (<a href="/recipes/tags/analyze/">analyze</a>, <a href="/recipes/tags/block/">block</a>, <a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/io/">io</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/nbd/">nbd</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>Linux Network Block Device server in Python</p> <p>This is a simplified version based on Kragen Sitaker's <a href="http://lists.canonical.org/pipermail/kragen-hacks/2004-May/000397.html" rel="nofollow">http://lists.canonical.org/pipermail/kragen-hacks/2004-May/000397.html</a></p> <p>Close is never actually called, at least not on the same connection -- linux C nbd-client -d seems to stall, perhaps it tries to open another socket?</p> <p>This code doesn't check for error conditions, failed reads/writes, past end of disk, etc.</p> <p>It prints io requests, you can analyze filesystem and user program io patterns.</p>