Little Help
 
Notifications
Clear all

Little Help

6 Posts
2 Users
0 Likes
215 Views
(@roodie)
Active Member Registered
Joined: 2 months ago
Posts: 3
Topic starter  

Feel a little stupid, ive got my code all sorted and it works great much better than BGInfo only problem I have is I'm trying to get a couple extra fields but I'm not able to work out how to get them to work.

Im after

Subnet, Gateway, DHCP Server and also Lease Expiry (if active) and also id like to read the content of a file and display it.

Any help would be great and thank you 🙂


   
Quote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1191
 

post your current code


   
ReplyQuote
(@roodie)
Active Member Registered
Joined: 2 months ago
Posts: 3
Topic starter  

Thank you Glenn,

Ill be running this on different Server OS's and Desktop OS's

=====================

[options-w]
width=430
height=600
centerv=1
centerh=1
toolbar=1
formcolor=000000

# font
font-face=Arial
font-size=10

# logging
log=desktopinfo.log
log-level=debugonerror

[text]
noresults=<n/a>
error=[error]
null-result=<null>
unknown=Unknown
executing=<executing>
menu-export=Export
menu-reload=Reload
menu-configuration=Edit Configuration
menu-log=Open Log File
menu-manual=Read Manual
menu-about=About Desktop Info
menu-quit=Quit
nav-previous=Previous Page
nav-home=Home Page
nav-next=Next Page

[items]

IMAGE=file:d:Image.png, column:1

# Host information
HOST=text:Host Name,padright:0,display:%1
USER=set:username,hidden:0
TIMEZONE=active:1,interval:60,color:EECC00
DATETIME=active:0,interval:1,color:EECC00
BOOTTIME=active:1,interval:1,color:EECC00
UPTIME=active:0,interval:1,color:EECC00
COMMENT=font-size:25%

#
# OS Information
COMMENT=color:008000,style:bu,text:OS Information

WMI=text:OS Version,namespace:rootcimv2,query:Win32_OperatingSystem,display:%caption% (%version%), Architecture:
WMI=text:Architecture,namespace:rootcimv2,query:Win32_OperatingSystem,display:%OSArchitecture%
COMMENT=font-size:25%

#
# Hardware Information
COMMENT=color:008000,style:bu,text:Hardware

WMI=text:Manufacturer,namespace:rootcimv2,query:Win32_Baseboard,display:%Manufacturer%
CPUTYPE=text:CPU Type
WMI=text:Cores,namespace:rootcimv2,query:Win32_Processor,display:%NumberOfCores%
CPUCOUNT=active:1,interval:0,color:0099EE
WMI=interval:5,text:Clock Speed,namespace:rootcimv2,query:Win32_Processor,display:%CurrentClockSpeed%MHz
COMMENT=font-size:25%
#

# Process Information
#COMMENT=color:%White%,style:bu,text:Processes
#CPU=font-size:85%,text:CPU Usage,interval:5,background-interval:10,chart:line linear 100 1 00ff00 2 0000bb,threshold1:1 80 0000ff,threshold2:2 40 0000ff,display:Tot: %1[2.0f]%, Krnl: %2[2.0f]%, Queue: %3
#CPUUSAGE=interval:5,font-size:80%,row-text: Core %1,chart:bar linear 100 2 80,bar-colors:%Blue% %Orange% %Magenta%,display:%2[2.0d]%
#TOPPROCESSCPU=interval:10,maxrows:2,text:Top Processes (CPU),
#TOPPROCESSMEM=interval:10,counter:pu,maxrows:2,text:Top Process (Mem),display:%1 %3[1.1b]B
#COMMENT=font-size:25%

# page 1 - memory
COMMENT=font-size:50%
PHYSICALRAM=interval:20,font-size:120%,color:008000,style:b,alarms:(%3 ge 80 0000FF),display:%1[3.1b]B / %2[3.1b]B
TOPPROCESSMEM=interval:10,font-size:100%,color:008000,style:b,counter:pu,text:Top Memory,display:%1 %3[1.1b]B

# page 1 - network
COMMENT=font-size:50%
WMI=interval:1,hide-no-result:1,color:60e8ff,font-size:90%,chart:line scale:log series1:1 color1:00ff00 series2:2 color2:bb00bb,alarms:(%1 ge 4000000 2222ee)(%2 ge 4000000 1010f0),text:Wifi Traffic,namespace:rootcimv2,query:Win32_PerfFormattedData_Tcpip_NetworkInterface where Name like "%Atheros AR9285%",display:R: %BytesReceivedPersec%[3.1b]Bps, S: %BytesSentPersec%[3.1b]Bps
WMI=interval:1,hide-no-result:1,color:60e8ff,font-size:100%,chart:line scale:log series1:1 color1:00ff00 series2:2 color2:bb00bb,alarms:(%1 ge 4000000 2222ee)(%2 ge 4000000 1010f0),text:Ethernet Traffic,namespace:rootcimv2,query:Win32_PerfFormattedData_Tcpip_NetworkInterface where Name like "%Ethernet%" and CurrentBandwidth>0,display:R: %BytesReceivedPersec%[3.1b]Bps, S: %BytesSentPersec%[3.1b]Bps

# page 1 - disks
COMMENT=font-size:70%
LOGICALDRIVES=interval:5,diskio:1,font-size:100%,chart:bar max:100 series1:7 threshold:75,alarms:(%11 ge 10000000 0000f0)(%13 ge 10000000 0060f0),row-text:Drive %1:%3|(%2),display:%6[1.0B]B / %5[1.0B]B|%chart%| r: %11[1.1B]B/s, w: %13[1.1B]B/s, q: %17

# Network Information
COMMENT=color:%White%,style:bu,text:Network
NETWORKINTERFACES=interval:30,operstatus:1,iftype:6 71,row-text:%2,display:%8
DNSSERVER=active:1,interval:1,color:008000

COMMENT=active:1,text:IT Emergency,Call 01234 567891
#
#
#
#
#

COMMENT=color:%White%,style:bu,text:

=====================


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1191
 
On Matt Welch said

Feel a little stupid, ive got my code all sorted and it works great much better than BGInfo only problem I have is I’m trying to get a couple extra fields but I’m not able to work out how to get them to work.

Im after

Subnet, Gateway, DHCP Server and also Lease Expiry (if active) and also id like to read the content of a file and display it.

Any help would be great and thank you 🙂

in NETWORKINTERFACES you can show
%8 ip address
%9 subnet (mask)
%10 prefix length
%15 dhcp servers
%17 gateways
%14 lease expiry

network nerds often prefer to see the prefix length (10.0.0.1/24) versus the subnet mask (10.0.0.1/255.255.255.0) but they convey the same information for the most part.

the following is from the sample-configdesktopinfo-advanced.ini file

display:%8 / %10 (%14)| gw:%17| dns:%15| dhcp:%19

this shows ipaddress / prefix length (lease expiry)| gateway | dns server | dhcp server

if we swap prefix length with subnet mask we have

display:%8 / %9 (%14)| gw:%17| dns:%15| dhcp:%19


   
ReplyQuote
(@roodie)
Active Member Registered
Joined: 2 months ago
Posts: 3
Topic starter  

Would you also be able to help with displaying the contents of a text file in D:\test.txt all the code i try never displays the content.

 

Thanks


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1191
 

Posted by: @roodie

Would you also be able to help with displaying the contents of a text file in D:\test.txt all the code i try never displays the content.

 

Thanks

 

FILECONTENTS=file:D:\test.txt

 


   
ReplyQuote
Glenn's Page