Install vnStat in Linux to monitor network traffic

This article covers how to install and configure vnStat in Linux. Also, you will see how to resolve some common errors relating to it.
#vnStat (view network statistics) is a network utility for the #Linux operating system.
It uses a command line interface. vnStat command is a console-based network #traffic #monitor.
It keeps a log of hourly, daily and monthly network traffic for the selected interface(s) but is not a packet sniffer.

Features of vnStat:
1. quick and simple to install and get running
2. gathered statistics persists through system reboots
3. can monitor multiple interfaces at the same time
4. data retention duration is fully user configurable on the fly
5. months can be configured to follow billing period
6. light, minimal resource usage
7. same low cpu usage regardless of traffic
8. can be used without root permissions
9. online color configuration editor

Read More

Docker error while loading shared libraries

This article covers how to fix docker #error while loading shared libraries which happens in the process of building a docker image.
The docker run command creates a container from a given image and starts the container using a given command. It is one of the first commands you should become familiar with when starting to work with #Docker.
Docker containers make it easy to put new versions of software, with new business features, into production quickly—and to quickly roll back to a previous version if you need to.
They also make it easier to implement strategies like blue/green deployments.

To stop all running containers:
1. kill all running #containers with docker kill $(docker ps -q)
2. delete all stopped containers with docker rm $(docker ps -a -q)
3. delete all images with docker rmi $(docker images -q)
4. update and stop a container that is in a crash-loop with docker update --restart=no && docker stop.

Read More

Malicious TMP files and processes

This article covers method to resolve malicious tmp processes. Most malware installers delete itself and these TMP files after successful installation.
The use of TMP files for atomicity is an advantage attackers currently enjoy.
They could have done this operation in any folder of the system, but they choose to use the standard Windows Temp folder.
The first thing a malware installer (first stage of infection) does when executed on a target system - be it a dropper or downloader - is to install a copy of the malware and its components into their corresponding location in the system.

Read More

KVM live migration to resolve performance issues

This article covers how to use KVM live migration to achieve load balancing which is important in a server virtualization system to maintain server performance.
Migration enables an administrator to move a virtual machine instance from one compute host to another. A typical scenario is planned maintenance on the source host, but migration can also be useful to redistribute the load when many VM instances are running on a specific physical machine.

Kernel-based Virtual Machine (KVM) is an open source virtualization technology built into Linux.
Specifically, KVM lets you turn #Linux into a #hypervisor that allows a host machine to run multiple, isolated virtual environments called guests or virtual machines (VMs).

Live migration of virtual machines is necessary when you need to achieve high-availability setups and load distribution.
The #KVM hypervisor has been a powerful alternative to Xen and VMware in the Linux world for several years.
To make the virtualization solution suitable for enterprise use, the developers are continually integrating new and useful features.
An example of this is live migration of virtual machines (VMs).

Live #migration involves:
The instance keeps running throughout the migration.
This is useful when it is not possible or desirable to stop the application running on the instance.
Live migrations can be classified further by the way they treat instance storage:
1. Shared storage-based live migration. The instance has ephemeral disks that are located on storage shared between the source and destination hosts.
2. Block live migration, or simply block migration. The instance has ephemeral disks that are not shared between the source and destination hosts. Block migration is incompatible with read-only devices such as CD-ROMs and Configuration Drive (config_drive).
3. Volume-backed live migration. Instances use volumes rather than ephemeral disks.

Block live migration requires copying disks from the source to the destination host.
It takes more time and puts more load on the network. Shared-storage and volume-backed live migration does not copy disks.

Read More

HTTP Client in Node js

This article covers how to create HTTP Client in Node.js. Here, we performed GET, POST, PUT, and DELETE requests in Node.js. Node HTTP tutorial shows how to create HTTP server and client applications in JavaScript with HTTP module.
HTTP is a Node.js module which can be used to create HTTP server and client applications in JavaScript.
Node.js comes bundled with an http and an https module. These modules have functions to create an HTTP server so that a Node.js program can respond to HTTP requests. They can also make HTTP requests to other servers.
Popular JavaScript frameworks including Express and HapiJS are built on top of the HTTP module.

To Set up HTTP:
1. First, we install the HTTP module.
$ node -v
$ npm init -y
2. We initiate a new Node.js application.
$ npm i http
3. We install HTTP with npm i http command.

Read More

SQL Server Memory Allocation

This article covers SQL server memory allocation best practices to follow while allocating memory.
By default, SQL Server can change its memory requirements dynamically based on available system resources.
SQL Server is designed to use all the memory on the server by default.
The reason for this is that #SQL Server cache the data in the database in #RAM so that it can access the data faster than it could if it needed to read the data from the disk every time a user needed it.
Changing SQL Server's Max Server memory is an online option – you don't need to restart SQL Server.
Though when you do make the change, you can and likely will cause data or procs to leave their caches so things could be a slight bit slower for a short while after you run it.
SQL Server will always give you better performance because the query is executed on the server.
Access on the back-end won't help because your client application will need to pull all the data from the tables, and then perform the join locally.
SQL Server has better indexing options.
'Max server memory' ensures that SQL Server buffer pool will not use more memory than specified in 'max server memory'.
So, SQL Server can use less memory than the value of 'max server memory' and other services can use the remaining memory.

You can monitor memory use at the database level as follows:
1. Launch SQL Server Management Studio and connect to a server.
2. In Object Explorer, right-click the database you want reports on.
3. In the context menu select, Reports -> Standard Reports -> Memory Usage By Memory Optimized Objects.

Read More

Focus on your business, not your servers.

Click Here to Learn More

Recent Post