Skip to content

Commit

Permalink
Add more informations from /sys/block/sd[a-z]/queue And iostats
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Dec 21, 2013
1 parent c2c8930 commit 06be67b
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 10 deletions.
36 changes: 36 additions & 0 deletions src/i-nex/.src/Disk_Drives.module
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ Public max_segments As String
Public max_segment_size As String
Public read_ahead_kb As String
Public scheduler As String
Public max_ratio As String
Public min_ratio As String
Public stable_pages_required As String
Public logical_block_size As String ' logical_block_size
Public iostats As String 'iostats
Public minimum_io_size As String ' minimum_io_size
Public nomerges As String ' nomerges
Public nr_requests As String ' nr_requests
Public optimal_io_size As String ' optimal_io_size
Public physical_block_size As String ' physical_block_size
Public rotational As String ' rotational
Public rq_affinity As String ' rq_affinity

Public Sub _inits()
Dim sdx As String
Expand Down Expand Up @@ -79,13 +91,25 @@ Public Sub get_informations()
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/discard_max_bytes" Wait To discard_max_bytes
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/discard_zeroes_data" Wait To discard_zeroes_data
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/hw_sector_size" Wait To hw_sector_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/iostats" Wait To hw_sector_size ' iostats
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/logical_block_size" Wait To logical_block_size ' logical_block_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/max_hw_sectors_kb" Wait To max_hw_sectors_kb
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/max_sectors_kb" Wait To max_sectors_kb
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/max_segments" Wait To max_segments
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/max_segment_size" Wait To max_segment_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/minimum_io_size" Wait To minimum_io_size ' minimum_io_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/nomerges" Wait To nomerges ' nomerges
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/nr_requests" Wait To nr_requests ' nr_requests
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/optimal_io_size" Wait To optimal_io_size ' optimal_io_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/physical_block_size" Wait To physical_block_size ' physical_block_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/read_ahead_kb" Wait To read_ahead_kb
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/scheduler" Wait To scheduler
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/rotational" Wait To rotational ' rotational
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/queue/rq_affinity" Wait To rq_affinity ' rq_affinity
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/" & Finfosys.ComboBox3.Text & "/size" Wait To real_size
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/bdi/max_ratio" Wait To max_ratio
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/bdi/min_ratio" Wait To min_ratio
Shell "cat /sys/block/" & Finfosys.ComboBox4.Text & "/bdi/stable_pages_required" Wait To stable_pages_required
Shell "sed -n '2p' /proc/swaps | awk {'print $1'} | cut -d '/' -f 3" Wait To check_swap
Shell "df | grep '" & Finfosys.ComboBox3.Text & "' | awk {'print $5'} | sed -n '1p'" Wait To used
Debug "Get informations of Drives Done"
Expand Down Expand Up @@ -123,6 +147,18 @@ Public Sub rm_new_line()
max_segment_size = Replace(max_segment_size, "\n", "")
read_ahead_kb = Replace(read_ahead_kb, "\n", "")
scheduler = Replace(scheduler, "\n", "")
max_ratio = Replace(max_ratio, "\n", "")
min_ratio = Replace(min_ratio, "\n", "")
stable_pages_required = Replace(stable_pages_required, "\n", "")
logical_block_size = Replace(logical_block_size, "\n", "") ' logical_block_size
iostats = Replace(iostats, "\n", "") 'iostats
minimum_io_size = Replace(minimum_io_size, "\n", "") ' minimum_io_size
nomerges = Replace(nomerges, "\n", "") ' nomerges
nr_requests = Replace(nr_requests, "\n", "") ' nr_requests
optimal_io_size = Replace(optimal_io_size, "\n", "") ' optimal_io_size
physical_block_size = Replace(physical_block_size, "\n", "") ' physical_block_size
rotational = Replace(rotational, "\n", "") ' rotational
rq_affinity = Replace(rq_affinity, "\n", "") ' rq_affinity
Debug "Replace new line to Null Done"

End
Expand Down
17 changes: 17 additions & 0 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ End
Public Sub System()
Dim hostname, arch, gcc, timezone, xorg_version, glx_version, gnumake As String
Shell "cat /etc/timezone || grep ^TIMEZONE= /etc/sysconfig/clock | cut -d '=' -f 2" Wait To timezone
If timezone = Null Or "" Then
Shell "timedatectl status | grep Timezone: |awk '{print $2}'" Wait To timezone
Endif
hostname = System.Host
arch = System.Architecture
Shell "gcc -dumpversion" Wait To gcc
Expand Down Expand Up @@ -497,6 +500,20 @@ Public Sub refreshing()
Label58.Text = "Read ahead kb: " & Disk_Drives.read_ahead_kb & ""
Label59.Text = "Scheduler: " & Disk_Drives.scheduler & ""

Label126.Text = "logical_block_size: " & Disk_Drives.logical_block_size & "" ' logical_block_size
Label127.Text = "iostats: " & Disk_Drives.iostats & "" ' iostats
Label128.Text = "minimum_io_size: " & Disk_Drives.minimum_io_size & "" ' minimum_io_size
Label129.Text = "nomerges: " & Disk_Drives.nomerges & "" ' nomerges
Label130.Text = "nr_requests: " & Disk_Drives.nr_requests & "" ' nr_requests
Label131.Text = "optimal_io_size: " & Disk_Drives.optimal_io_size & "" ' optimal_io_size
Label132.Text = "physical_block_size: " & Disk_Drives.physical_block_size & "" ' physical_block_size
Label133.Text = "rotational: " & Disk_Drives.rotational & "" ' rotational
Label134.Text = "rq_affinity: " & Disk_Drives.rq_affinity & "" ' rq_affinity

Label123.Text = "BDI max_ratio: " & Disk_Drives.max_ratio & ""
Label124.Text = "BDI min_ratio: " & Disk_Drives.min_ratio & ""
Label125.Text = "BDI stable_pages_required: " & Disk_Drives.stable_pages_required & ""

If Disk_Drives.removable Like "0" Then
Label45.Text = "Removable: No"
Endif
Expand Down
105 changes: 95 additions & 10 deletions src/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,90 @@
Move(7,175,455,14)
ToolTip = ("used space on the partition")
}
{ Label123 Label
Move(7,399,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label123")
Border = Border.Plain
}
{ Label124 Label
Move(7,420,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label124")
Border = Border.Plain
}
{ Label125 Label
Move(154,420,308,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label125")
Border = Border.Plain
}
{ Label126 Label
Move(7,336,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label126")
Border = Border.Plain
}
{ Label127 Label
Move(154,336,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label127")
Border = Border.Plain
}
{ Label128 Label
Move(301,336,161,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label128")
Border = Border.Plain
}
{ Label129 Label
Move(7,357,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label129")
Border = Border.Plain
}
{ Label130 Label
Move(154,357,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label130")
Border = Border.Plain
}
{ Label131 Label
Move(301,357,161,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label131")
Border = Border.Plain
}
{ Label132 Label
Move(7,378,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label132")
Border = Border.Plain
}
{ Label133 Label
Move(154,378,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label133")
Border = Border.Plain
}
{ Label134 Label
Move(301,378,161,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label134")
Border = Border.Plain
}
Index = 5
Text = ("System")
{ Button5 Button
Expand Down Expand Up @@ -902,63 +986,64 @@
Border = Border.Plain
}
{ Label136 Label
Move(7,196,455,21)
Move(7,196,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label136"
Border = Border.Plain
}
{ Label137 Label
Move(7,217,455,21)
Move(7,217,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label137"
Border = Border.Plain
}
{ Label138 Label
Move(7,238,455,21)
Move(7,238,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label138"
Border = Border.Plain
}
{ Label139 Label
Move(7,259,455,21)
Move(7,259,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label139"
Border = Border.Plain
}
{ Label140 Label
Move(7,280,455,21)
Move(7,280,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label140"
Border = Border.Plain
}
{ Label141 Label
Move(7,301,455,21)
Move(7,301,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label141"
Border = Border.Plain
}
{ Label142 Label
Move(7,322,455,21)
Move(7,322,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label142"
Border = Border.Plain
}
{ Label143 Label
Move(7,343,455,21)
Move(7,385,455,21)
#Translate = False
Visible = False
Font = Font["Bold,8"]
Text = "Label143"
Border = Border.Plain
}
{ Label144 Label
Move(7,364,455,21)
Move(7,343,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label144"
Expand All @@ -969,7 +1054,7 @@
Stretch = True
}
{ Label145 Label
Move(7,385,455,21)
Move(7,364,231,21)
#Translate = False
Font = Font["Bold,8"]
Text = "Label145"
Expand Down

0 comments on commit 06be67b

Please sign in to comment.