Month: February 2022

How to check the disk performance using dd

dd command should be available in ESXi as well as all Linux versions. If you face any issues with your application and wants to know the disk performance is deteriorated, you can quickly use the dd command to check the write/read performance of the disk. The disk used can be even a datastore or a network device also. You can cross check with another system or disk where you don’t see any performance issues to compare the results to know if there is any issues with the disk.

Below is the example to run in a VMWare ESXi volume.

/vmfs/volumes/54a55c07-9face633-0999-002590fc98c8 # time dd if=/dev/zero of=test bs=1M count=1024

1024+0 records in 1024+0 records out

real 2m 7.62s user 0m 4.69s sys 0m 0.00s

= ( 1024/127 = 8 MB/s !!! )

In the above example you are trying to write a 1GB file and you are using time command to find out the speed at which the write happened.

Source: Horrible disk performance under ESXi | [H]ard|Forum

ESXTOP & Queues – VMware Technology Network VMTN

This page provides you a quick summary on what is AQLEN and DQLEN in ESXi.

AQLEN is the adaptor queue length. This should be derived from storage adaptor queue depth, which is the maximum commands which can be in the queue waiting for process.

DQLEN is the device queue length. This should be derived from storage device(usually drives) queue depth, which is the maximum commands which can be in the queue waiting for process.

 

Source: ESXTOP & Queues – VMware Technology Network VMTN

Tutorial: How to revert your git commit

This example shows how to revert your git commit.

As an example I have modified README.md file in my website

C:\code\smccake\smccake>git diff
diff --git a/README.md b/README.md
index 44ea578..58e71fc 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
-# smccake
+# smccake test
St. Marys church Cake Project

Committed the code with “git commit command”

C:\code\smccake\smccake>git commit -m "test commit" -a
[main 0c92a65] test commit
 1 file changed, 1 insertion(+), 1 deletion(-)

C:\code\smccake\smccake>git log
commit 0c92a659288e78cd277acd57ec5bdb8aec37464e (HEAD -> main)
Author: Yogindar <yogindar@yahoo.com>
Date:   Thu Feb 3 16:12:41 2022 +0530

    test commit

Note the commit hash id 0c92a659288e78cd277acd57ec5bdb8aec37464e. This is what we used to refer back our commits.

Now we wanted to revert the commit, we can use the “git revert” command with the commit hash.

C:\code\smccake\smccake>git revert 0c92a659288e78cd277acd57ec5bdb8aec37464e
[main 5c26ac1] Revert “test commit”
1 file changed, 1 insertion(+), 1 deletion(-)

You can do a “git push”

I’m going to give you another extra lecture on how to add the reverted changes back.

So we know the commit hash, now generate the diff again using the commit hash.

Create a patch with the diff and apply it.

C:\code\smccake\smccake>git diff “0c92a659288e78cd277acd57ec5bdb8aec37464e^” 0c92a659288e78cd277acd57ec5bdb8aec37464e
diff –git a/README.md b/README.md
index 44ea578..58e71fc 100644
— a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
-# smccake
+# smccake test
St. Marys church Cake Project

git diff “0c92a659288e78cd277acd57ec5bdb8aec37464e^” 0c92a659288e78cd277acd57ec5bdb8aec37464e > changes.patch

C:\code\smccake\smccake>git apply changes.patch

C:\code\smccake\smccake>git diff
diff –git a/README.md b/README.md
index 44ea578..58e71fc 100644
— a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
-# smccake
+# smccake test
St. Marys church Cake Project

Happy giting…:-)