Use raw disk for Apache Trafficserver in Centos 7

I want to use raw disk for my Trafficserver 5.1.0. I've created a partition at /dev/sda5 and in order to allow trafficserver to use the disk, please follow these steps.

1) Edit/create a file in /etc/udev/rules.d . I named it 50-ats.rules
eg. vi /etc/udev/rules.d/50-ats.rules

2) Add these text.
SUBSYSTEM=="block", KERNEL=="sda5", GROUP:="trafficserver", OWNER:="nobody"

note :
- sda5 is the disk/partition I want to use with trafficserver.
- OWNER:="nobody" is the default owner when you compile trafficserver.


Delete network item in XenServer

List the network available in XenServer using :

xe network-list

Identify the selected network by it's UUID, then destroy the network using :
xe network-destroy uuid=fe0651d4-da09-8fc2-5407-4b707d614a5e

List the networks again to confirm.

SQL Tips : EXTRACT function as alternative to TO_CHAR

You want to create a sql to list data group in year (datetime datatype). Example as below :
The table is smp.SC03F_TEMP with over 10 million rows. Usually, if there something deals with date we will use to_char function. As an alternative, you can use extract function to extract certain part of the date. In belows example, we extract the year of a column. As we can see the time taken is almost half for 10 million rows. Happy trying.

select count(*) from smp.SC03F_TEMP;
-- 10,866,921 records

select count(*), to_char(A.SC03TARIKH, 'YYYY')
from smp.SC03F_TEMP a
group by to_char(A.SC03TARIKH, 'YYYY');
-- Time taken 54sec

Clear mapped folder connect in Windows XP

Open 'Command Prompt' by goto 'Start - Run' and type cmd and press 'Enter' key.

Type net use to get list of mapped network.
To clear all connection, type net use * /delete and pres 'Enter'
It will ask whether to delete or not each mapped connect made from your PC.