I need some people (5 should be enough at moment) who do this:
please type:
cat /proc/diskstats >/root/mark-help.txt
probepart >> /root/mark-help.txt
gzip /root/mark-help.txt
Then please attach /root/mark-help.txt.gz here.
I'm doing some tests to find out a fast way to get drive-infos.
probepart is a bit slow, if you have many partitions.
I wrote a testcript, that gives me this result:
I'd like to find out more info, but don't know yet, how.# ./finddisks
hda1 not mounted
hda2 not mounted
hda5 not mounted
hda6 not mounted
hdb mounted maybe a cdrom
sda1 not mounted
sda2 mounted
sda3 not mounted
sda4 not mounted
sda5 not mounted
sda6 not mounted
sda7 mounted
sda8 not mounted
sda9 not mounted
sda10 not mounted
sda11 not mounted
sda12 not mounted
sda13 not mounted
sda14 not mounted
sda15 mounted
swap: /dev/sda15 partition 522072 6132 -1
Must study the other utilities like MUT.
Mark
finddisks
Code: Select all
#!/usr/bin/puppybasic
include "/usr/lib/wxbasicscript/basefunctions.inc"
//thelist=xwin_system("cat /proc/diskstats")
// 3 64 hdb 0 0 0 0 0 0 0 0 0 0 0
thelist=readfiletolist("/proc/diskstats")
//print thelist
partitions = {}
counter = 0
for each theline in thelist
theline=trim(theline)
for n=0 to 5
theline=replace(theline , " " , " ")
next
partinfo=explode(theline , " ")
entries=count(partinfo)
//print partinfo[2] & " " & entries
if entries = 7 then
mounted = "mounted"
if partinfo[5] = "0" then
mounted = "not mounted"
end if
print partinfo[2] & " " & mounted
end if
if val(partinfo[1])>63 then
mounted = "mounted"
if partinfo[5] = "0" then
mounted = "not mounted"
end if
print partinfo[2] & " " & mounted & " " & "maybe a cdrom"
end if
next
swaps=readfiletolist("/proc/swaps")
for n=1 to count( swaps )-1
print "swap: " & swaps[n]
next