Thursday, August 13, 2015

Conky With a Vengeance

Yet another little tinker update on the Conky config since the last one.

Here's the full .conkyrc. Of course blogger munges the output, so I've noted long lines with the character; there should actually be no line break on those lines:

background no
font Sans:size=8
use_xft yes
xftalpha 0.9
update_interval 5.0
total_run_times 0
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_argb_value 196
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 1200
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
border_inner_margin 5
#border_inner_margin 20
draw_graph_borders yes
default_color CDE0E7
default_shade_color black
default_outline_color green
alignment top_right
gap_x 12
gap_y 0
no_buffers yes
uppercase no # set to yes if you want all text to be in uppercase
cpu_avg_samples 2
override_utf8_locale no

TEXT
${voffset 1} ${voffset -1}

${color gray}${font Sans:size=10}${voffset 5}${time %d-%b-%Y}${font}
    ${font Sans:size=12}${voffset -5}${alignr}${time %I:%M %p}${font}

${color white}SYSTEM ${hr 1}${color}
Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
MB Temperature: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Physical id 0'|awk '{print $4}'}${iconv_stop}
CPU Temperature 0: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 0'|awk '{print $3}'}${iconv_stop}
CPU Temperature 1: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 1'|awk '{print $3}'}${iconv_stop}
CPU Temperature 2: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 2'|awk '{print $3}'}${iconv_stop}
CPU Temperature 3: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 3'|awk '{print $3}'}${iconv_stop}
Fan 1: ${alignr}${hwmon 1 fan 1} RPM
Fan 2: ${alignr}${hwmon 1 fan 2} RPM
GPU Temp: ${alignr}${exec nvidia-smi | grep '. ..\% ..C'|
    awk '{print $3}'}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg

${color yellow}CPU LOAD ${hr 1}${color}
${color b0b000}CPU Frequency: ${alignr}${freq} MHz
CPU1 ${alignr}${cpu cpu1}%
${cpubar cpu1}
${cpugraph cpu1 000000 ffffff}
CPU2 ${alignr}${cpu cpu2}%
${cpubar cpu2}
${cpugraph cpu2 000000 ffffff}
CPU3 ${alignr}${cpu cpu3}%
${cpubar cpu3}
${cpugraph cpu3 000000 ffffff}
CPU4 ${alignr}${cpu cpu4}%
${cpubar cpu4}
${cpugraph cpu4 000000 ffffff}
${color b0b040}CPU All
${cpugraph cpu0 000000 ff0000}${color}

${color 30b030}RESOURCE USAGE ${hr 1}${color}
${color 30b030}RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}
Swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}${color}

${color gray}Highest CPU $alignr CPU% MEM%${color}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}

${color gray}Highest Memory $alignr CPU% MEM%${color}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}

${color white}FILE SYSTEM ${hr 1}${color}
Root: ${alignr}${fs_used /} / ${fs_size /}
${fs_bar 4 /}
Files: ${alignr}${fs_used /files} / ${fs_size /files}
${fs_bar 4 /files}

${color white}NETWORK ${hr 1}${color}
Eth0: ${addr eth0}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}

Friday, August 7, 2015

Superuser, Moderation, and Should I Bother

I just noticed tonight that an answer I did on superuser.com has been moderated into oblivion. It had 17 up votes, earning a "Nice Answer" badge, so some people at least felt it was useful.

While I can understand the intention behind the aggressive pruning that occurs, it's just...really disheartening having put some effort into answering as best I could in a precise, useful way, only to have it shitcanned. Especially when to my way of thinking there were a number of things in the answer that would have more longevity than other questions that survive just fine on SU.

So, for posterity, here's my answer. The question was regarding any potential issues with the asker's new PC build, which included common parts like an i5-4570, Gigabyte B85M-D3H, Kingston RAM, GT610, WD Green, and a fairly crappy looking case/PSU combo.

There are a couple of general rules of thumb you should follow when speccing your machine:

  • Don't cheap out on the power supply. I have no idea what is included in that case (specs are not forthcoming), but the price is so much cheaper than many budget cases that come with no power supply, I'm inclined to think that it is very low quality. Unless you are in dire need to save money, look for a separate PSU like a Seasonic. Many Antec or Corsair PSUs are good, as are some Coolermaster or Thermaltake. If you need to get a case/PSU combo due to budget, look for something like the Thermaltake Versa series.

  • Current onboard graphics (which is built into the CPU and accessed via the ports on the motherboard) is better than a low-end GPU like the GT610. Age of Empires doesn't need much graphics power, so I think you'll be fine with onboard graphics. The disclaimer is perhaps you want a cheap GPU for experimentation purposes, targeting your software to particular graphics card or something.

  • The CPU and the GPU are the two biggest parts that determine what kind of power supply you need. The system as specced above will use <150W even at maximum load. A good quality 350-450W PSU is where you should be looking, unless you want to support upgrade to a high-end gaming graphics card in the future — if so, look for 500-600W.

  • The motherboard you have chosen can only run RAM at 1600MHz, so the 1866MHz will clock back to that anyway. You could get a 1600MHz with CL9 timings (lower the better for timings), only a very minor difference in performance though.

  • Most modern consumer CPU/motherboard use dual channel RAM, you will get a mild performance boost by getting 2x4GB of RAM.

  • Get an SSD if you can and install the OS/applications on it. Use the HDD for storage. SSDs are awesome, particularly if you do dual-boot, as they reduce boot times and application load times significantly.

  • If you can't get an SSD due to budget, don't use a 5400RPM hard drive like the Caviar Green as your boot drive, they are very slow. A WD Caviar Blue (for example) is a better option.

  • Consider a Virtual Machine for doing the Linux development if dual-booting gets annoying. Unfortunately VMs are bad for games, so you can't really do it the other way around. Alternatively, you could consider running the games under wine in Linux. AoE III for example appears to have pretty reasonable support. Dual-booting is pretty annoying in my experience if other options are available.

Edit:

  • Since it's your first time putting one together too, I'd suggest watching a few videos on how to do it (search youtube for "how to build a computer" or similar). Will give you a feel for how everything fits together.

The whole thing is still available in the google cache in case anyone is particularly interested.