PHP Test Script

 

To see whether PHP is running on the web server, you can create a simple script which will self generate a page full of PHP information.

It will give you the following information:

  • System information
  • Build date
  • Server API
  • Virtual directory support
  • Path to PHP.ini
  • Additional configuration files
  • Additional used configuration files
  • Others….

Simply create a file called “info.php” with the following code:

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.

Openfiler Syslog Errors “iscsi_trgt”

I have Openfiler 2.99.2 running on VMware ESX 5.1 and noticed syslog errors –

month day 00:00:00 openfiler kernel: [45189.253028] iscsi_trgt: scsi_cmnd_start(1035) Unsupported 93
month day 00:00:00 openfiler kernel: [45189.253102] iscsi_trgt: cmnd_skip_pdu(457) 1a2e0d00 1c 93 512
month day 00:00:00 openfiler kernel: [45488.730405] iscsi_trgt: scsi_cmnd_start(1035) Unsupported 93
month day 00:00:00 openfiler kernel: [45488.730476] iscsi_trgt: cmnd_skip_pdu(457) 88d0e00 1c 93 512

After a bit of research I came up with the following from VMware:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1033665

From the article:

This article provides steps to disable the vStorage APIs for Array Integration (VAAI) functionality in ESXi/ESX. You may want to disable VAAI if the storage array devices in the environment do not support the hardware acceleration functionality or are not responding correctly to VAAI primitives.

Disable VAAI using the vSphere Client

  1. Open VMware vSphere Client
  2. In the inventory pane, select the ESXi host
  3. Click the Configuration tab
  4. Under Software, click Advanced Settings
  5. Click DataMover
  6. Change the DataMover.HardwareAcceleratedMove setting to 0
  7. Change the DataMover.HardwareAccleratedInit setting to 0
  8. Click VMFS3
  9. Change the VMFS3.HardwareAcceleratedLicking setting to 0
  10. Click OK to save your settings

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.

Reset a Cisco Router to Factory Default Settings

There are currently two ways to reset a Cisco router or switch to factory default.

Reference: http://www.cisco.com/en/US/products/sw/iosswrel/ps5187/products_tech_note09186a00802017a1.shtml

Method 1

This method uses the config-register 0x2102 command in global configuration mode.

Method 2

This method uses the config-register 0x2142 command in global configuration mode.

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 Install and Configure Splunk on Linux

Splunk is a software package for sending logs from a variety of server types or devices to a centralised repository for the ability to do searching, monitoring and analyzing of big data using a web style interface console.

This Example

In this example I will be installing Splunk version 6.0 on a virtualised Linux Debian Wheezy distribution using the deb package.

Assumptions

The following assumptions are taken prior to installation:

  • A fresh copy of Linux Debian Wheezy is installed
  • Debian Wheezy is fully patched
  • A network connection is present
  • A connection can be established to the internet
  • No firewall restrictions are in place (port 8000 specifically)

Procedure

Downloading Splunk

Installing Splunk

Start Splunk

Auto Start Splunk

Connect to Splunk

  1. Open a web browser
  2. Connect to http://<serverip>:8000

Create Syslog Receiver

Settings > Data > Data inputs

Under “TCP” click on “Add New”

TCP Port = 514
Accept Connections from all hosts? = yes
Set sourcetype = From List
Select source type from list = syslog
Click Save

Do the same but set up UDP

Syslog from Cisco

In this example I am going to log absolutely everything from the Cisco device to the Splunk server. When selecting a logging level you get the log level and up so for example if I use 4 (warnings) I get logs from warnings, errors, critical, alerts and emergencies.

0 emergency
1 alerts
2 critical
3 errors
4 warnings
5 notifications
6 informational
7 debugging

Rsyslog from Linux

Add the following to the end of /etc/rsyslog.conf

Change “@splunk” to the server name

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.