August 9, 201015 yr I'm working on a disk utilities plugin, and need to start storing information for each disk. Obviously, a lot of other plugins may want to use/update this data, so it needs to share nicely. I'm suggesting: filename: <disk serial number>.conf location: /boot/disk/config My reason for suggesting /boot/disk/config, is that when people upgrade or swap flashes, the /config directory is usually retained. Some of the information I foresee being stored in these files, you would want to carryover, such as inventory control info (purchase date, retailer) usage info (install date), and maintenance thresholds (lifetime, temperature alarm thresholds). Since these are not data files that grow with time (such as with smarthistory) there should be no issues with space. Proposed format / information ===================== [iNVENTORY] comment= first_seen= purchase_date= purchased_from= warranty_expires= [MONITORING] desired_temp=33 alert_temp=40 alarm_temp=45 shutdown_temp=54 read_smart_if_spun_down=YES lifespan=26280 [sMARTMONITOR] ;these are the smart parameter IDs, and the threshold value that if exceed, generates an alert. ;"A" means alert... we can have other letters for other actions ; in this example, and alert is generated if: ; Reallocated_Sector_Ct >= 200 ; Reallocated_Event_Count >= 50 A5=200 A196=50 Comments?
August 9, 201015 yr I think its a great idea. The location of the file seems fine to me or how about /boot/config/pluginname/<disk serial number>.conf?
August 9, 201015 yr Author I think its a great idea. The location of the file seems fine to me or how about /boot/config/pluginname/<disk serial number>.conf? That doesn't really make much sense.... data/code that is local to one plugin, goes in /boot/custom/<pluginname>
August 9, 201015 yr That could be quite a number of files, Then as disks change the number of files increase. My system is 20+ disks. Either a subdirectory or prefix might be worthwhile. If it's a real .ini file what about using sections? [sERIAL NUMBER] var1= var2= var3= var=4 Otherwise how is that .conf file laid out? EDIT: What about. /boot/config/disk/serialnumber.conf if /boot/config were an etc directory (which it pretty much is). Then multiple files for a database would probably in a subdirectory.
August 9, 201015 yr I think its a great idea. The location of the file seems fine to me or how about /boot/config/pluginname/<disk serial number>.conf? That doesn't really make much sense.... data/code that is local to one plugin, goes in /boot/custom/<pluginname> Sorry!! I meant custom (brain fart)
August 9, 201015 yr Author I updated the OP, with the new path and some additional info on the file format/contents.
August 9, 201015 yr I updated the OP, with the new path and some additional info on the file format/contents. OK, so this is a real .ini file with [sections], var=value. What about naming it as .ini. /boot/disk/config/disk/serialnumber.ini Usually a conf file is a var=value or var (some delimiter) value. I've even seen .conf files sourced to populate the current environment. Yet usually if there are [sections] then it is named .ini it is a configuration file, but it seems to be a more advanced sectioned one hence the .ini designation.
August 10, 201015 yr Author There is no reason it has to have sections... I just use them for organizing, they don't really do anything.
Archived
This topic is now archived and is closed to further replies.