Cache lspci Output #17

Open
opened 2026-02-02 15:04:06 -05:00 by jared · 0 comments
Owner

get_storage_controllers() calls lspci every time

lspci 2>/dev/null | grep -iE "SAS|SATA|RAID|Mass storage|NVMe"

Optimization: Call once at script start, store in variable.

# get_storage_controllers() calls lspci every time lspci 2>/dev/null | grep -iE "SAS|SATA|RAID|Mass storage|NVMe" Optimization: Call once at script start, store in variable.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/driveAtlas#17