kysdk.Disk(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay bestie, meet kysdk.Disk 💾 — your section 3 (library functions manual) girlie from the kysdk fam, and she is genuinely so good at disks. Her whole thing: getting disk info.

Mainly she's here to hand you the list of disks, the number of sectors on a disk, the bytes in each sector, the capacity, the model, the serial number, the number of sub-partitions, the type, and the firmware version info. That's the vibe. No cap 🌸


🦋 SYNOPSIS 🦋

Inherits kysdk.Base.

(yes she's got a whole family tree, we love a nepo baby who actually delivers 🫶)

💅 Public Member Functions

  • def __init__ (self) — the constructor. She is born. That's it, that's the whole function.
  • def getDiskList (self) — get the list of all the disks.
  • def getDiskSectorSize (self, dev_path) — get the number of bytes in each sector of the disk.
  • def getDiskTotalSizeMiB (self, dev_path) — get the disk capacity.
  • def getDiskModel (self, dev_path) — get the disk model.
  • def getDiskSerial (self, dev_path) — get the disk serial number.
  • def getDiskPartitionNums (self, dev_path) — get the number of sub-partitions under a disk/partition.
  • def getDiskType (self, dev_path) — get the disk type.
  • def getDiskVersion (self, dev_path) — get the disk firmware version info.
  • def getDiskSectorNum (self, dev_path) — get the number of disk sectors.

🌈 Additional Inherited Members

the original page literally just says "Additional Inherited Members" and then moves on 💀. No list, no names — so that's genuinely all we know, bestie. She inherits stuff, and the manpage refuses to elaborate. mysterious queen behavior.


👑 Detailed Description 👑

获取磁盘信息 — getting disk info 🎀

Mainly it's for grabbing the list of disks, the number of sectors on a disk, the bytes per sector, the capacity, the model, the serial number, the number of sub-partitions, the type, and the firmware version info. All of it. The whole disk résumé. Periodt.


📖 Member Function Documentation 📖

def kysdk.Disk.getDiskList ( self)

Get the list of all the disks 🗂️✨

Returns

  • the list of disks, where every string is the absolute path of one disk. (str girlies, we stan.)

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskModel ( self, dev_path)

Get the disk model 🏷️

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the disk model.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskPartitionNums ( self, dev_path)

Get the number of sub-partitions under a disk/partition 🧩

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the number of sub-partitions under that disk/partition.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskSectorNum ( self, dev_path)

Get the number of disk sectors 🔢

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the number of sectors.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskSectorSize ( self, dev_path)

Get the number of bytes in each sector of the disk 📏

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the number of bytes in each sector.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskSerial ( self, dev_path)

Get the disk serial number 🔖

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the disk serial number.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskTotalSizeMiB ( self, dev_path)

Get the disk capacity 🐘

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the disk capacity, in MiB units.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskType ( self, dev_path)

Get the disk type ⚡

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the disk type: 固态 or 机械 or 混合 — solid state, mechanical, or hybrid. so basically SSD girlie, spinning-disk girlie, or a bit of both ✨

References kysdk.SessionBase.interface, and kysdk.Base.interface.


def kysdk.Disk.getDiskVersion ( self, dev_path)

Get the disk firmware version info 🛠️

Parameters

  • dev_path — names the disk you want; it should be an absolute path like /dev/sda.

Returns

  • the firmware version info.

References kysdk.SessionBase.interface, and kysdk.Base.interface.


🎀 Author 🎀

Generated automatically by Doxygen for kysdk.py from the source code. (not a human author, just a robot doing its little thing 🤖💖)


💜 and that's the whole page, bestie! quick lil sign-off: this came out of My Project, dated Thu Sep 21 2023 🌸 go read your disks, you absolute icon 👑✨
📦 where this page comes from