Category: How To

PowerCLI 0

[PowerCLI]: ESXi Syslog Configuration via PowerCLI

What’s Syslog? Syslog is a standard for message logging. It allows software to generating messages with a standard format and store the messages as log files on a local disk or shared storage for analyzing and troubleshooting. Syslog has two standard components: Syslog client is a software agent for collecting the software messages and store those messages as log file or send it to a remote server. Syslog server is a remote server to receiving messages from remote clients and store messages on a storage as log file or log database. What’s VMware Syslog Collector? VMware Syslog Collector is Syslog server which provided by VMware as one of vSphere component. Syslog Collector will be installed as stand-alone server or integrated with vCenter server. So when you purchased vSphere product, you have a Syslog server that fully compatible with ESXi, so there is no need to deploy another third-party Syslog server. Configure Syslog via PowerCLI Typically, Syslog will configure on ESXi via vSphere Client and vSphere Web Client but when you have more than one ESXi, configuring Syslog on ESXi is difficult. So you can configure Syslog via PowerCLI. It allows you to configure Syslog on all ESXi servers by run...

Access to Shell via VI or VIM 1

[How To]: Access to Shell via VI or VIM Editor

Shell Access via VI or VIM Why do you need to access shell via VI or VIM? A: sometimes, you have to copy result of a commands and paste those results to editor. For example, you are configuring SCSI devices as DM-Multipath devices, you have to run some commands like “multipath -l” for see “WWID” of specific device and add the “WWID” to “multipath.conf”. As simple solution, you can run another ssh session and run the command on this session, then copy and paste the result. But I think, there is another good way to do it. You can access to shell via VI or VIM editor and do your job! But how to? How to Access Shell via VI or VIM? Run VI or VIM command to open the editors and start to edit your file. For accessing to shell, you must run the below command within VI or VIM: :shell Or this command: :sh Then you will access to shell and the editor is still open. The shell is opened for your temporary, so you must have access to editor again. Press Ctrl+D or type “exit” and hit Enter for return back to the editor.

Linux Distribution 0

[How To]: Linux tac Command – Usage and Examples

Linux tac Command tac command practically is reverse version of cat command. It means, any result in cat command will be reversed by tac command. tac is lesser known and less used command in Linux but I want to show you the command usage and some examples. Usage and Examples tac command has few options same as cat command, we’ll review some of its options at the below. Example 1 Comparison cat and tac outputs. In this example, we have a file with the below content: [root@localhost ~]# cat sample1.txt This is first line. This is second line. This is third line. This is fourth line. Now, print the file’s content by tac: [root@localhost ~]# tac sample1.txt This is fourth line. This is third line. This is second line. This is first line. Example 2 Both tac and cat commands has separator option which one of the most important options and the command is represented by the -s switch, which separates the contents of the file based on a string or a keyword from the file. [root@localhost ~]# cat sample1.txt —1— 1 2 3 —2 A B C —3– a b c [root@localhost ~]# tac –before –regex –separator=^—[0-9]+-*$ sample1.txt —3–...

Linux Cat Command - Create New File 0

[How To]: Linux Cat Command – Usage and Examples

Linux Cat Command Cat or “concatenate files and print on the standard output” is a Linux command to print file content on the standard output like screen. This is one of most popular Linux commands. I think that every Linux administrator has executed the below command at least one time 😉 : # cat /var/log/messages So this is actually very useful and popular command. Usage and Examples Cat command has few options but has lot of usages. Show file content: If Cat command run without options, it will shows you the content of the file or files. Show multiple files content: You can view content of multiple files by entering more than one file name in command line, see the below example: Create New File: You be able to create new file by Cat command. Run the below command and then enter some strings and when it’s finished hit Enter, if you are end of a line and then Ctrl+D for save the new file. Please consider that existing files will be overwrite by run same command.   Join Multiple Files: Joining multiple files to a file is possible by Cat command. Here is an example: # cat file1.txt file2.txt file3.txt > all-files.txt...

Veeam ONE Reporter Collection 3

[Veeam ONE]: Veeam ONE Reporter Session Task Failed

Veeam ONE Reporter Collection Job Veeam ONE Reporter collection job is a scheduled job to gathering virtual infrastructure information to providing reports for administrators about virtual infrastructure performance, issues and capacity planning. Sometimes, the job will be failed cause of some issues in the Veeam Reporter service and an error will indicate on Veeam ONE Monitor Client. Administrators should care about the issue because the error means that virtual infrastructure information is out of date and any report is unusable. Troubleshooting Step 1: At first step, checking “Veeam ONE Reporter Server” service is very important. Check the service and if it’s stopped, start the service and if it’s started , restart the service and run “Object Properties Collection Task” from Veeam ONE Reporter portal. Wait to job is completed and if issue not resolve go to the next step. Step 2: If stop/start the service didn’t resolve issue, restarting the server is second solution because of OS issues. Run “Object Properties Collection Task” from Veeam ONE Reporter portal, wait to job is completed and if issue not resolve go to the next step. Step 3: If step 1 and step 2 didn’t help to resolve issue, the monitor user permission...

[How To]: Restart Unisphere Management Server 0

[How To]: Restart Unisphere Management Server

EMC Unisphere is a web based management GUI for managing EMC VNX family and actually, this is Java web application that hosting by a Windows. Sometimes, the management server shows incorrect status for disks, RAID Groups or LUNs. As an example, there is no faulty disks on array enclosures but LUN health status is marked as faulted. Restarting Unisphere management server is one of solution for resolving such that issue.

Linux Distribution 1

Partition Table in Linux: Quick and Easy Way to Reload

Linux shell is most popular than GUI in Linux systems and most of Linux administrators doing their tasks and system configurations via shell. But shell is most difficult than GUI. They do many thing via shell for example adding new disks or partitions for applications and services. Sometimes administrators and users faced with the below messages after create new partitions: WARNING: Re-reading the partition table failed with error 16: Device or resource busy The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks. Or after run “mkfs.extX” command to create file-system on the partition: Could not stat /dev/sdXX — No such file or directory The device apparently does not exist; did you specify it correctly? Actually, kernel couldn’t reload partition table at this situation and ask administrator to reboot the machine for reloading partition table. Let’s Review Solutions for Reloading Partition Table Partprobe This utility is the first solution for reloading partition table of the disk. It’s installed on most distribution by default. Run the below command to reload partition table manually: partprobe /dev/sdX (X is the device letter) If Partprobe doesn’t work and...

Monitoring Temperature And Fan Speed In Linux By LM-Sensors 0

Monitoring Temperature And Fan Speed In Linux By LM-Sensors

What’s LM-Sensors Health monitoring is very important for critical servers because administrators can do proper actions before any impact on service. There is many third-party software for monitoring Linux and Windows servers but native agents are also useful. We are going to review one of native solutions for hardware health monitoring in Linux.

vmware uuid 0

Find, Convert And Compare, VMware Virtual Machine And Windows Guest UUID

What’s UUID? Each virtual machine has UUID and it will appear on OS as guest UUID too. A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems, the 16 bytes of this value are separated by spaces. Microsoft uses the term globally unique identifier (GUID), either as a synonym for UUID or to refer to a particular UUID variant.

Multipath 0

Multipath: Best and Safe Solution Map in Use Devices

Based on Red Hat solution (https://access.redhat.com/solutions/47438), the below steps should be done before flush any multipath device, otherwise the command will be failed: Once all holders of the device have been removed, the device should be flushed with “multipath -f“. But may the above instruction failed at first step because the disk is hold by a process. Problem! Here is an example of the error: multipath -f {Multipath Alias} Mar 1 09:59:10 | {Multipath Alias}: map in use dmsetup remove -f {Multipath Alias} device-mapper: remove ioctl on {Multipath Alias} failed: Device or resource busy Solution! What is the solution for this problem? As Red Hat mentioned, “Locate any subsystem or process holding the device open”. Usually a process holding the disk or disks, so as the first step follow the below: lsof | grep {Multipath Alias} Output will be same as the below: oracle 10298 oracle 257u BLK 252,8 0t0 18446612177448267048 /dev/oracleasm/disks/{Multipath Alias} (deleted) In this example output, oracle process holding the disk and the process should be identified before any action: ps -ef | grep 10298 oracle 10298 1 0 2016 ? 00:00:00 oraclecmsrestd (LOCAL=NO) If there is no problem about killing the process, kill the process by the...

arch anywhere 002 0

Installing Arch Linux Using Arch Anywhere – Part 2

This post is 2nd part of Arch Linux installation guide and as you may read the first part, you know that we want to do it by Arch Anywhere and now, if you have downloaded ISO from Arch Anywhere website, mount it and follow the below steps. I’ll install Arch Linux on a virtual machine, you can do it on virtual machine or physical machine.

arch anywhere 001 1

Installing Arch Linux Using Arch Anywhere – Part 1

Arch Linux is one of most popular Linux distributions and one of most updated Linux distributions. Arch Linux has no graphical or automatic installer for installation and installing Arch Linux is not simple for most new users. During installation, you have to do initialize disk, create partitions, configure boot-loader and other configurations manually. So you need to know enough about Linux. If you know, what are you doing, it would be wonderful experience but if not, it will be dark dream! Now, what’s solution to gain experience of working with most updated Linux for beginner users? Answer, you can use Arch Anywhere to install Arch Linux. What’s Arch Anywhere?  Arch Anywhere contains a script to give you ability to install Arch Linux with very customization and of course, all things will be automated.

0

Find HBA Firmware Version in Linux – Easy Way

You need to know, what is version of your HBA firmware to upgrade it or install compatible driver version. There is many ways to find firmware version but I want to share easier way. Just logon to your Linux machine with Sudo user and run the below command: cat /sys/class/fc_host/host*/symbolic_name

Oracle VM 0

Oracle VM Server – Log Files

Why You Need Log Files? Log files are keys to resolving problems in any IT system, why?! You are unable to troubleshooting without having log files. Any enterprise system must have logging system and logging is very important to IT administrators. Log location is very important for IT administrators even very importantly. Oracle VM Server log files locations are listed in the following table: Log File Directory Description xend.log /var/log/xen/ Contains a log of all the actions of the Oracle VM Server daemon. Actions are normal or error conditions. This log contains the same information as output using the xm log command. xend-debug.log /var/log/xen/ Contains more detailed logs of the actions of the Oracle VM Server daemon. xen-hotplug.log /var/log/xen/ Contains a log of hotplug events. Hotplug events are logged if a device or network script does not start up or become available. qemu-dm.pid.log /var/log/xen/ Contains a log for each hardware virtualized guest. This log is created by the quemu-dm process. Use the ps command to find the pid (process identifier) and replace this in the file name. ovs-agent.log /var/log/ Contains a log for Oracle VM Agent. osc.log /var/log/ Contains a log for Oracle VM Storage Connect plug-ins. ovm-consoled.log /var/log/ Contains...

Oracle VM 0

Oracle VM Server – Memory Size of the Management Domain (Dom0)

Oracle VM Server installer using the below algorithm to set default memory size for dom0: dom0 Memory = 502 (MB) + (Physical Memory (MB) * 0.0205) As an example, your physical server has 256 GB memory, dom0 needs to 5.7 GB memory. If you didn’t assign enough memory to dom0, you will face with serious performance issues. So calculating dom0 memory is very important for preventing performance issues on your virtual machines. Also you can change dom0 memory size by the below instruction: Edit your grub configuration on the Oracle VM Server to adjust the value for the dom0_mem parameter. If you are using UEFI boot, the grub configuration file is located at /boot/efi/EFI/redhat/grub.cfg, otherwise the grub configuration file is located at /boot/grub2/grub.cfg. Edit the line starting with multiboot2 /xen.gz and append the required boot parameters. For example, to change the memory allocation to 1024 MB, edit the file to contain: multiboot2 /xen.gz dom0_mem=max:1024M placeholder ${xen_rm_opts}