More from: general information

Server Side Weather data collection script for GNU/Linux

The following script is intended to run on your file server that collects data to distribute to your network. Safety is built in to prevent contacting NOAA weather.gov more than one time per hour. The data comes in .xml format and contains the recommended time to collect the data, per each region. Information on what files to request can be found by much digging and a visit to XML Feeds of Current Weather Conditions https://w1.weather.gov/xml/current_obs/ and NWS Public Alerts in XML/CAP and ATOM Formats https://alerts.weather.gov/ combined with close attention to the browser URL when you look at your weather on weather.gov.

#!/bin/bash
# pull weather from weather.gov
# But ONLY IF it has not been pulled recently
# weather is updated once per hour & recommended time to pull is hour+15
# program cron accordingly
# last_update: 20170826 JDN
#
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# define minimum time lapse before new pull is permitted
declare -i MINAGE=22
echo 'Min age' $MINAGE

# calculate time lapsed since last pull
if [ -f wwraw.xml ];
then
  declare -i LAPSE=$(( ( $(date +%s) - $(stat wwraw.xml -c %Y)) / 60 ))
echo 'Lapse' $LAPSE
else
  declare -i LAPSE=999
fi

# allow override of command line parameter #1 is --force
if [ -n "$1" ]; then declare -i FORCE=1; else declare -i FORCE=0; fi
echo force is $FORCE

#log outside IP
echo "OpenDNS/Google" $(dig +short myip.opendns.com @resolver1.opendns.com) / $(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com) >wwraw.xme

# calculate if pull is permitted (boolean)
DOPULL=$(( $LAPSE >= $MINAGE ))
echo dopull is $DOPULL

# test time lapse vs. minimum time lapse to allow pull or override
# Check if file older
if [[ $(($DOPULL + $FORCE)) -gt 0 ]]; then
# debugging message output if pull was performed
  echo "File was pulled $LAPSE minutes ago. Pulling new weather data"

# get surface observations
# file will have date / time from weather.gov
  wget -q --output-document="wwraw.xml" http://w1.weather.gov/xml/current_obs/KFWA.xml

# mark file with current time to prevent hammering weather.gov
  touch wwraw.xml

# get weather alerts
  wget -q --output-document="walerts.xml" http://alerts.weather.gov/cap/wwaatmget.php?x=INC003&y=0

else
# debugging message output if pull was not performed
  echo "File was pulled $LAPSE minutes ago. Ignoring request to pull again."
fi

#cleanup
unset FORCE
unset DOPULL
unset MINAGE
unset LAPSE
exit 0

Sample .conkyrc file

Conky Documentation can be found at http://conky.sourceforge.net/documentation.html.

conky.config = {
    alignment = 'top_right',
    background = true,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'FFFFCC',
    default_outline_color = 'white',
    default_shade_color = 'gray',
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'Arial:size=9',
    gap_x = 5,
    gap_y = 6,
    minimum_height = 5,
    minimum_width = 200,
    maximum_width = 280,
    net_avg_samples = 2,
    no_buffers = true,
    double_buffer = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'panel',
    own_window_hints = 'undecorated',
    own_window_hints = 'below',
    own_window_hints = 'sticky',
    own_window_hints = 'skip_taskbar',
    own_window_hints = 'skip_pager',
    own_window_transparent= false,
    stippled_borders = 0,
    update_interval = 4.0,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false
}
conky.text = [[
${color FFAA00}SYSTEM ${hr 2}$color
$nodename $sysname $kernel on $machine
${color yellow}Kernel:${color } $kernel  ${color yellow}UpTime: ${color }$uptime
${color yellow}Users: ${color red}${font Verdana:style=bold:size=8}${exec users} ${font}${color}
${color FFAA00}BATTERY ${hr 2}$color
${apcupsd localhost 3551}${color}Line: ${color green}${apcupsd_linev} ${color AAAAFF}VAC${color} Time: ${color green}${apcupsd_timeleft} ${color AAAAFF}min ${color}Charge: ${color green}${apcupsd_charge}%${color}
${color}Load: ${color green}${apcupsd_load}% ${color ivory} ${apcupsd_loadbar}${color}
${color FFAA00}Process Status ${hr 2}$color
     SSH: ${exec service ssh status | sed -n '/Active:/p' | cut -c 11-27}
 MySQL: ${exec service mysql status | sed -n '/Active:/p' | cut -c 11-27}
Apache: ${exec service apache2 status | sed -n '/Active:/p' | cut -c 11-27}
${color FFAA00}CPU ${cpu cpu0}% ${freq_g cpu0}GHz ${hwmon 1 temp 1}°C${hr 2}$color
#${color CC00CC}${font arial:bold:size=12}Total CPU: ${color 00CC00}${cpu cpu0}% ${freq_g cpu0}GHz  ${color 00FF00}${acpitemp}°C ${font}${color}
#${color CC00CC}${font arial:bold:size=12}Total CPU: ${color 00CC00}${cpu cpu0}% ${freq_g cpu0}GHz ${color 00FF00}${exec sensors | grep 'CPU Temperature:' | cut -c19-28} MB:${color 00FF00}${exec sensors | grep 'MB Temperature:' | cut -c19-28} ${font}${color} 
#${font arial:bold:size=12}${color 00CC00}CPU ${color 00FF00}${cpu cpu0}%${color 00CC00} ${freq_g cpu0}GHz ${color 00FF00}${hwmon 1 temp 1}°C${color} ${font}${color}
#Core 1: ${freq 1} MHz ${cpu cpu1}% ${color 597DB2}${cpubar cpu1}$color
#Core 2: ${freq 2} MHz ${cpu cpu2}% ${color 597DB2}${cpubar cpu2}$color
#Core 3: ${freq 3} MHz ${cpu cpu3}% ${color 597DB2}${cpubar cpu3}$color
#Core 4: ${freq 4} MHz ${cpu cpu4}% ${color 597DB2}${cpubar cpu4}$color
#Core 5: ${freq 5} MHz ${cpu cpu5}% ${color 597DB2}${cpubar cpu5}$color
#Core 6: ${freq 6} MHz ${cpu cpu6}% ${color 597DB2}${cpubar cpu6}$color
#
1: ${cpu cpu1}% ${color 597DB2}${cpubar cpu1 5,100}$color  2: ${cpu cpu2}% ${color 597DB2}${cpubar cpu2 5,100}$color
3: ${cpu cpu3}% ${color 597DB2}${cpubar cpu3 5,100}$color  4: ${cpu cpu4}% ${color 597DB2}${cpubar cpu4 5,100}$color
5: ${cpu cpu5}% ${color 597DB2}${cpubar cpu5 5,100}$color  6: ${cpu cpu6}% ${color 597DB2}${cpubar cpu6 5,100}$color
7: ${cpu cpu7}% ${color 597DB2}${cpubar cpu7 5,100}$color  8: ${cpu cpu8}% ${color 597DB2}${cpubar cpu8 5,100}$color
#
${alignr}${font fixed:size=10}NAME               PID    CPU%   MEM% 
${alignr}${color CCFFFF}${top name 1} ${top pid 1}    ${top cpu 1}     ${top mem 1} 
${alignr}${top name 2} ${top pid 2}    ${top cpu 2}     ${top mem 2} 
${alignr}${top name 3} ${top pid 3}    ${top cpu 3}     ${top mem 3} 
${alignr}${top name 4} ${top pid 4}    ${top cpu 4}     ${top mem 4} ${font}
#
${color FFAA00}MEMORY ${hr 2}$color
 RAM: ${color green}$memfree${color} Free of ${color green}$memmax${color} or ${color green}$memperc%${color} in use
${color FF6600} ${membar 6}$color
Swap: ${color green}$swapfree${color} Free of ${color green}$swapmax${color} or ${color green}$swapperc%${color} in use
${color FF6600} ${swapbar 6}$color
#
${color FFAA00}DISK ${hr 2}$color
/: ${color green}${fs_free /}$color Free of ${color green}${fs_size /}$color or ${color green}${fs_used_perc /}%$color in use
${color FF6600} ${fs_bar 6 /}$color
/a: ${color green}${fs_free /a}$color Free of ${color green}${fs_size /a}$color or ${color green}${fs_used_perc /a}%$color in use
${color FF6600} ${fs_bar 6 /a}$color
/a/Backups: ${color green}${fs_free /a/Backups}$color Free of ${color green}${fs_size /a/Backups}$color or ${color green}${fs_used_perc /a/Backups}%$color in use
${color FF6600} ${fs_bar 6 /a/Backups}$color
/vmware: ${color green}${fs_free /vmware}$color Free of ${color green}${fs_size /vmware}$color or ${color green}${fs_used_perc /vmware}%$color in use
${color FF6600} ${fs_bar 6 /vmware}$color
#/nash_data: ${color green}${fs_free /nash_data}$color Free of ${color green}${fs_size /nash_data}$color or ${color green}${fs_used_perc /nash_data}%$color in use
#${color FF6600} ${fs_bar 6 /nash_data}$color
${color FFAA00}NETWORK ${hr 2}$color
${exec cat wwraw.xme}
${color 00FF00}${font bold:size=9}${addr enp2s0}${font}$color Down: $color${downspeed enp2s0}/s ${alignr}Up: ${upspeed enp2s0}/s
${downspeedgraph enp2s0 25,140 000000 ff0000} ${alignr}${upspeedgraph enp2s0 25,140 000000 00ff00}$color
Total: ${totaldown enp2s0} ${alignr}Total: ${totalup enp2s0}
#
${color 00FF00}${font bold:size=9}${addr enp5s5f0}${font}$color Down: $color${downspeed enp5s5f0}/s ${alignr}Up: ${upspeed enp5s5f0}/s
${downspeedgraph enp5s5f0 25,140 000000 ff0000} ${alignr}${upspeedgraph enp5s5f0 25,140 000000 00ff00}$color
Total: ${totaldown enp5s5f0} ${alignr}Total: ${totalup enp5s5f0}
#
#${color 00FF00}${font bold:size=9}${addr enp5s5f1}${font}$color Down: $color${downspeed enp5s5f1}/s ${alignr}Up: ${upspeed enp5s5f1}/s
#${downspeedgraph enp5s5f1 25,140 000000 ff0000} ${alignr}${upspeedgraph enp5s5f1 25,140 000000 00ff00}$color
#Total: ${totaldown enp5s5f1} ${alignr}Total: ${totalup enp5s5f1}
Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}
${color FFAA00}WEATHER ${hr 2}$color${font Verdana:size=9}
#${execi 3600 curl -s w1.weather.gov/xml/current_obs/KFWA.xml > wwraw.txt}
#${execi 3600 wget -q --output-document="walerts.xml" http://alerts.weather.gov/cap/wwaatmget.php?x=INC003&y=0}
${color 00FF00}${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1}${color}
${color 00FF00}${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1}${color}
${color 888888}Wind: ${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1}${color}
${color FFFF00}Humidity: ${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1}% ${color}
${color 00FF00}Temperature: ${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1}${color}
${color 888888}Dew Point: ${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1}${color}
${color 888888}Pressure: ${exec cat wwraw.xml | sed -n '//p' | cut -d'>' -f2 | cut -d'<' -f1} in Hg${color}${font}
${font Verdana:style=bold:size=10}Warnings:${font}${color}
${exec cat walerts.xml | sed -n '/\

June Indiana Employment Stats

For additional information, contact:
Kayli Schroeder, 317-232-7358, KSchroeder@dwd.in.gov

This just in via email from Indiana Department of Workforce Development <dwd@subscriptions.in.gov>:

INDIANAPOLIS (July 19, 2019) – Indiana’s unemployment rate drops to 3.5 percent for June and remains lower than the national rate of 3.7 percent. The monthly unemployment rate is a U.S. Bureau of Labor Statistics (BLS) indicator that reflects the number of unemployed people seeking employment within the prior four weeks as a percentage of the labor force.

Indiana’s labor force had a net decrease of 10,126 over the previous month. This was a result of a decrease of 3,123 unemployed residents and a decrease of 7,003 employed residents. Indiana’s total labor force, which includes both Hoosiers employed and those seeking employment, stands at 3.39 million, and the state’s 64.8 percent labor force participation rate remains above the national rate of 62.9 percent.

In addition, regular unemployment insurance claims in the reference week (12th of the month) continue to decline in 2019.


Tax Credits Information available from IRS Now

This in email from IRS today. The child tax credits for 2018 has drastically INCREASED over 2018 – working poor and middle class families get about twice as much credit as previously, including for special needs children older than 17. Details on how to get the money are at the IRS link via govdelivery.com. The content of their email is as follows:


Issue Number:    IR-2018- 217


Get Ready for Taxes:
Here’s how the new tax law revised family tax credits

WASHINGTON – More families will be able to get more money under the newly-revised Child Tax Credit, according to the Internal Revenue Service.

This is the third in a series of reminders to help taxpayers get ready for the upcoming tax filing season. Additionally, the IRS has recently updated a special page on its website with steps to take now for the 2019 tax filing season.

The Tax Cuts and Jobs Act (TCJA), the tax reform legislation passed in December 2017, doubled the maximum Child Tax Credit, boosted income limits to be able to claim the credit, and revised the identification number requirement for 2018 and subsequent years. The new law also created a second smaller credit of up to $500 per dependent aimed at taxpayers supporting older children and other relatives who do not qualify for the Child Tax Credit.

“As we approach the 2019 tax-filing season, I want to remind taxpayers to take advantage of this valuable tax credit if they are eligible to claim it,” said IRS Commissioner Chuck Rettig. “Tax reform changed the tax code significantly and doubling the Child Tax Credit is an example of how the changes impact taxpayers.”

Here are some important things taxpayers need to know as they plan for the tax-filing season in early 2019:

Child Tax Credit increased

Higher income limits mean more families are now eligible for the Child Tax Credit. The credit begins to phase out at $200,000 of modified adjusted gross income, or $400,000 for married couples filing jointly, which is up from the 2017 levels of $75,000 for single filers or $110,000 for married couples filing jointly.

Increased from $1,000 to $2,000 per qualifying child, the credit applies if the child is younger than 17 at the end of the tax year, the taxpayer claims the child as a dependent, and the child lives with the taxpayer for more than six months of the year. The qualifying child must also have a valid Social Security Number issued before the due date of the tax return, including extensions.

Up to $1,400 of the credit can be refundable for each qualifying child. This means an eligible taxpayer may get a refund even if they don’t owe any tax.

For more information, see Publication 972, Child Tax Credit, available soon on IRS.gov.

New Credit for Other Dependents

A new tax credit – Credit for Other Dependents — is available for dependents for whom taxpayers cannot claim the Child Tax Credit. These dependents may include dependent children who are age 17 or older at the end of 2018 or parents or other qualifying relatives supported by the taxpayer.

During the upcoming tax-filing season, the IRS urges taxpayers to use the agency’s Interactive Tax Assistant to see if they qualify for either of these credits. To find out more, visit IRS.gov.


July 2018 Employment Data

This just in via email from the Indiana Department of Workforce Development. NOTE: the increase of 2,964 in unemployed residents shows 2,964 more people are now seeking jobs – people who gave up looking long ago are now re-entering the job market in earnest with intent to become employed. This is a very strong indicator that the quality and benefits of available jobs has increased enough to attract more workers.

July Indiana Employment Report

INDIANAPOLIS (Aug. 17, 2018) – Indiana’s unemployment rate stands at 3.4 percent for July and remains lower than the national rate of 3.9 percent. With the exception of one month when it was equal (October 2014), Indiana’s unemployment rate now has been below the U.S. rate for more than four years. The monthly unemployment rate is a U.S. Bureau of Labor Statistics (BLS) indicator that reflects the number of unemployed people seeking employment within the prior four weeks as a percentage of the labor force.

Indiana’s labor force had a net increase of 15,564 over the previous month. This was a result of a 2,964 increase in unemployed residents and an increase of 12,600 employed residents. Indiana’s total labor force, which includes both Hoosiers employed and those seeking employment, stands at 3.38 million, and the state’s 64.8 percent labor force participation rate remains above the national rate of 62.9 percent. Indiana’s labor force growth of 67,519 over the past six months represents the state’s largest six-month increase since 1995 in the state.

In addition, Indiana’s initial unemployment insurance claims continue to be at historical lows.

Learn more about how unemployment rates are calculated here: http://www.hoosierdata.in.gov/infographics/employment-status.asp.