Skip to content

Commit

Permalink
Show CPUINFO And CPUID information. First use /proc and two use CPUID…
Browse files Browse the repository at this point in the history
… Instruction.

I-Nex now detect Processor flags and show if processor have this
instruction.

+ Add Real OS, Measure Processor Clock
  • Loading branch information
eloaders committed Jan 14, 2014
1 parent 4c97f91 commit eb1de96
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 31 deletions.
4 changes: 2 additions & 2 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ File[19]=".src/FModules.class:2.19"
File[20]=".src/Input_Devices.module:2.19"
File[21]=".src/net.module:2.19"
File[22]="Data/report-ng.sh:5.3"
File[23]=".src/Distribution_Detect.module:2.19"
File[23]=".src/Distribution_Detect.module:22.34"
File[24]=".src/FFlags.module:2.19"
File[25]=".src/Finfosys.class:845.20"
File[25]=".src/Finfosys.class:86.43"
File[26]=".src/FDF.form"
File[27]=".src/FDF.class:2.19"
File[28]=".src/FNET_R_T.form"
Expand Down
90 changes: 65 additions & 25 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.
Private ToolButton[94] As ToolButton
Private Label[94] As Label ' Dim the array of controls
Private YESNO As Picture
Public AllowLog As Boolean
Public sLine As String
Public aScan As String[]
Expand All @@ -28,34 +31,71 @@ Public Sub Form_Open()
Dim default_display_manager As Boolean = Exist("/etc/X11/default-display-manager")
Dim cpuz0, cpuz1, cpuz2, cpuz3, cpuz4, cpuz5, cpuz6, cpuz7, cpuz8, cpuz9, cpuz10, cpuz11 As String
Dim z As Integer
Dim i As Integer
Exec ["/usr/bin/inex-cpuid"] Wait To BUFFER
DATAT = JSON.Decode(BUFFER)
ListView1.Add(0, DATAT["VENDOR_STR"])
ListView1.Add(1, DATAT["CPU_CODENAME"])
ListView1.Add(2, DATAT["BRAND_STR"])
ListView1.Add(3, DATAT["NUM_CORES"])
ListView1.Add(4, DATAT["NUM_LOGICAL_CPUS"])
ListView1.Add(5, DATAT["TOTAL_LOGICAL_CPUS"])
ListView1.Add(6, DATAT["FAMILY"])
ListView1.Add(7, DATAT["MODEL"])
ListView1.Add(8, DATAT["STEPPING"])
ListView1.Add(9, DATAT["EXT_FAMILY"])
ListView1.Add(10, DATAT["EXT_MODEL"])
ListView1.Add(11, DATAT["CPU_CLOCK"])
ListView1.Add(12, DATAT["CPU_CLOCK_BY_OS"])
ListView1.Add(13, DATAT["CPU_CLOCK_BY_IC"])
ListView1.Add(14, DATAT["CPU_CLOCK_MEASURE"])
ListView1.Add(15, DATAT["MARK_TSC"])
ListView1.Add(16, DATAT["MARK_SYS_CLOCK"])
For z = 0 To 93
If DATAT["Flags"][z]["VALUE"] = 1 Then
GDF = "True"
ListView1.Add(z + 17, DATAT["Flags"][z]["NAME"] & " " & GDF & " " & DATAT["Flags"][z]["DESC"])
Else
GDF = "False"
ListView1.Add(z + 17, DATAT["Flags"][z]["NAME"] & " " & GDF & " " & DATAT["Flags"][z]["DESC"])
Endif
Label92.Text = "" & DATAT["VENDOR_STR"]
Label193.Text = "" & DATAT["CPU_CODENAME"]
Label194.Text = "" & DATAT["BRAND_STR"]
Label195.Text = "Cores: " & DATAT["NUM_CORES"]
Label196.Text = "Logical CPUS: " & DATAT["NUM_LOGICAL_CPUS"]
Label197.Text = "Total Logical CPUS: " & DATAT["TOTAL_LOGICAL_CPUS"]
Label198.Text = "Family: " & DATAT["FAMILY"]
Label199.Text = "Model: " & DATAT["MODEL"]
Label200.Text = "Stepping: " & DATAT["STEPPING"]
Label201.Text = "Ext Family: " & DATAT["EXT_FAMILY"]
Label202.Text = "Ext Model: " & DATAT["EXT_MODEL"]
Label203.Text = "CPU Clock: " & DATAT["CPU_CLOCK"]
Label204.Text = "CPU Clock BY OS: " & DATAT["CPU_CLOCK_BY_OS"]
Label205.Text = "CPU Clock BY IC: " & DATAT["CPU_CLOCK_BY_IC"]
Label206.Text = "CPU Clock Measure: " & DATAT["CPU_CLOCK_MEASURE"]
Label207.Text = "Mark TSC: " & DATAT["MARK_TSC"]
Label208.Text = "Mark SYS Clock: " & DATAT["MARK_SYS_CLOCK"]

'btnClose.Tooltip = ("Quit")
'Me.Center4
For i = 1 To 93
Label[i] = New Label(ScrollView1) As "Labelgroup" ' Create a new button in the array and store it in an action group
With Label[i]
'.X = (i - Int((i - 1) / 3) * 3) * 60 - 30
'.Y = Int((i - 1) / 3) * 60 + 170
.X = 2
.Y = 140 + Int(i * 20)
.Width = 440
.Height = 21
.Border = 3
.Padding = 3
.Tooltip = DATAT["Flags"][i]["NAME"]
.Text = DATAT["Flags"][i]["DESC"]
End With
Next
For i = 1 To 93
ToolButton[i] = New ToolButton(ScrollView1) As "ToolButtongroup" ' Create a new button in the array and store it in an action group
If DATAT["Flags"][i]["VALUE"] = 1 Then
YESNO = Picture["Data/check_true.png"]
Else
YESNO = Picture["Data/check_false.png"]
Endif
With ToolButton[i]
'.X = (i - Int((i - 1) / 3) * 3) * 60 - 30
'.Y = Int((i - 1) / 3) * 60 + 170
.X = 420
.Y = 140 + Int(i * 20)
.Width = 21
.Height = 21
.Picture = YESNO
.Tooltip = DATAT["Flags"][i]["VALUE"]
End With
Next
' For z = 0 To 93
' If DATAT["Flags"][z]["VALUE"] = 1 Then
' GDF = "True"
' ListView1.Add(z + 17, DATAT["Flags"][z]["NAME"] & " " & GDF & " " & DATAT["Flags"][z]["DESC"])
' Else
' GDF = "False"
' ListView1.Add(z + 17, DATAT["Flags"][z]["NAME"] & " " & GDF & " " & DATAT["Flags"][z]["DESC"])
' Endif
' Next
If User.Name = "root" Then
Message.Error(("Running as root is not allowed!\n " & User.Home & ""))
Endif
Expand Down
130 changes: 126 additions & 4 deletions src/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
Orientation = Align.Bottom
Highlight = True
Index = 0
Text = ("Main")
Text = ("CPUINFO")
{ Timer1 #Timer
#Move(413,378)
Delay = 2000
Expand Down Expand Up @@ -399,10 +399,132 @@
Picture = Picture["AppIcons/dialog-ok.png"]
}
Index = 1
Text = ("More...")
{ ListView1 ListView
Text = ("CPUID")
{ ScrollView1 ScrollView
Move(0,0,469,455)
Font = Font["9"]
{ Label92 Label
Move(2,7,439,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label92")
Alignment = Align.Center
Border = Border.Raised
}
{ Label193 Label
Move(287,28,154,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label193")
Border = Border.Raised
}
{ Label194 Label
Move(2,28,287,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label194")
Border = Border.Raised
}
{ Label195 Label
Move(2,49,98,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label195")
Border = Border.Raised
}
{ Label196 Label
Move(98,49,119,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label196")
Border = Border.Raised
}
{ Label197 Label
Move(217,70,119,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label197")
Border = Border.Raised
}
{ Label198 Label
Move(217,49,119,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label198")
Border = Border.Raised
}
{ Label199 Label
Move(2,70,98,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label199")
Border = Border.Raised
}
{ Label200 Label
Move(336,70,105,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label200")
Border = Border.Raised
}
{ Label201 Label
Move(336,49,105,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label201")
Border = Border.Raised
}
{ Label202 Label
Move(98,70,119,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label202")
Border = Border.Raised
}
{ Label203 Label
Move(2,91,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label203")
Border = Border.Raised
}
{ Label204 Label
Move(147,91,140,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label204")
Border = Border.Raised
}
{ Label205 Label
Move(287,91,154,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label205")
Border = Border.Raised
}
{ Label206 Label
Move(2,112,147,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label206")
Border = Border.Raised
}
{ Label207 Label
Move(147,112,140,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label207")
Border = Border.Raised
}
{ Label208 Label
Move(287,112,154,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Label208")
Border = Border.Raised
}
{ Separator12 Separator
Move(0,133,441,21)
}
}
Index = 0
}
Expand Down

0 comments on commit eb1de96

Please sign in to comment.