Browse websites in a Linux terminal

linux-logo-300x300

I stumbled upon a package that allows the user to browse websites in a terminal, I thought I’d spin up a VM and try this for myself…

Installing W3M

This is very simple, requires one package (two if you want images displayed in Xterm)

apt-get install w3m w3m-img

Browsing

Now this isn’t going to look pretty as it’s in a terminal but it will work

w3m
w3m google.com
w3m google.com

Navigation

You can use the arrow keys to navigate to the section you want or use the mouse to click on the particular area.

shift+ b = Take you back a page

shift + u = Gives you a URL prompt

Shift + h = Help menu

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Rebuild locale on Linux

linux-logo-300x300

A quick note on how to rebuild Linux locale, you might get the following errors if your locale is broken:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

To find out what locale is set, run the following:

locale

Output should be something like this:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_AU.UTF-8
LANGUAGE=
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTI

To rebuild the locale, run the following: (using en_AU.UTF-8 as an example)

locale-gen en_AU.UTF-8

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

How to Upgrade Cisco Flash Firmware Version

Cisco_logo

 

I recently had to upgrade a Cisco router to a new firmware version, so I thought I’d write up a quick how-to guide.

Prerequisites:

  • Download the new flash version from Cisco (you need a valid Cisco login)
  • TFTP the firmware to the Cisco device
  • Connect to the Cisco device using a console cable (highly recommended!

1. Log into the router
2. Elevate to enable

enable
<password>

3. Check to see if the flash is in the correct location

dir flash:

4. Enter configuration terminal

config term

5. Disable current flash

no boot system

6. Specify flash file

boot system flash: <fullfilenameplusextension>

7. Exit out of configuration terminal

exit

8. Display the version

show version

If the last digit in the configuration register is 0 or 1 the n go to next step however if the last digit in the configuration register is between 2 and F then proceed to step 12

9. Enter configuration terminal

config term

10. Run config-register command

config-register 0x2102

11. Exit out of configuration terminal

exit

12. Copy the running to startup

copy run start

13. Restart the Cisco device

reload

When prompted to save the configuration, enter no

When prompted to confirm and reload, enter yes

If the router reboots and then reboots again straight away, it has not worked and has reverted back to the last firmware version

If it simply reboots, log in and check the version

show version

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Citrix XenApp: Event 10001 – A usable server cannot be found on which to launch the application. Check your worker group definitions and load balancing policies to verify appropriate servers are assigned

citrix-logo

After rebooting my Citrix XenApp server,  I was presented with an error in the application event log for the Citrix application stating the following: “A usable server cannot be found on which to launch the application. Check your worker group definitions and load balancing policies to verify appropriate servers are assigned”.

Event_10001

Details blanked out to protect the innocent

After doing a lot of Google searching, I came across a forum with someone with the same problem, to verify the issue I ran the following command:

qfarm /load

It gave me a result of “1000” which apparently isn’t right

So to resolve this issue you have to rebuild the perfmon counters, in my example I am using Microsoft Windows 2008

lodctr.exe /r

Citrix_XenApp_Qfarm_lodctr
If you need to rebuild the counters for Microsoft Windows Server 2003, see this article here

Additionally, you will find a summary of what the qfarm values are here:

0 to 9998 = This is a normal range for the load manager
99999  = No load evaluator is configured
10000 = load is at 100 percent (full)
10000! = Application disabled for this server
10001 = Out of licenses
10002 = No ICA connections are available for that server
20000 = Incorrect server edition or a license mismatch
99990 = No permission to run qfarm

It fixed the problem for me, hopefully for you too.

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Enable SNMP Traps on a VMware ESX 5.1 + Physical Host

LOGO1

I reinstalled my VMware ESX servers the other month and haven’t got around to setting the SNMP traps back up for Observium to use so I thought I’d make a quick article to show how it is done (as I had to look it up again).

1. Log into the console or shell to the box

2. Run the following command to set the trap name (Replace TRAPNAME with the community name you use)

esxcli system snmp set --communities TRAPNAME

2. Enable the trap

esxcli system snmp set --enable yes

3. Log into vSphere

4. Select the host

5. Select the configuration tab

6. Select Software -> Security Profile

7. Under Firewall, click properties

8. Find the SNMP Server under labelVMware ESX SNMP Server 1

9. Go into the options of the service

10. Change to “Start and stop with host”

11. Click on StartVMware ESX SNMP Server 2

 

Your traps should now be working

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.