Πέμπτη 16 Δεκεμβρίου 2021

case:run iperf between 2 amazon ec2 intances in same security group

Interesting points,1.exeptional behaviour of amazon linux,2inbound rules 3.iperf options

Check the below link for guidance due to exceptional behaviour of amazon linux 

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/

Amazon Linux

Amazon Linux 2:


Install the EPEL release package for RHEL 7 and enable the EPEL repository.


sudo amazon-linux-extras install epel -y

Amazon Linux Amazon Machine Image (AMI):


The EPEL repository is already installed on the original version of Amazon Linux, but you must enable it. You can enable this repository either by using the yum-config-manager command or by editing the epel.repo file.


sudo yum-config-manager --enable epel

sudo yum install iperf


These  two instances are in the same vpc and security group.

Also in the security group add an inbound rule to allow tcp traffic between member of this group




then:

from node1  run iperf as client



[ec2-user@ip-172-31-88-129]$ iperf -s

------------------------------------------------------------

Server listening on TCP port 5001

TCP window size:  128 KByte (default)

------------------------------------------------------------

[  4] local 172.31.88.129 port 5001 connected with 172.31.80.251 port 37922

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec  1.16 GBytes   999 Mbits/sec




from node2 run iperf as server using node2 private ip


[ec2-user@ip-172-31-80-251 ~]$ iperf -c 172.31.88.129

------------------------------------------------------------

Client connecting to 172.31.88.129, TCP port 5001

TCP window size:  715 KByte (default)

------------------------------------------------------------

[  3] local 172.31.80.251 port 37922 connected with 172.31.88.129 port 5001

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0-10.0 sec  1.16 GBytes  1.00 Gbits/sec




The result is 1GBit/sec!!

Τετάρτη 8 Δεκεμβρίου 2021

Linux advanced cases that need to keep in mind

 One of the most in-depth areas of linux is kernerl,check how to go through kernel messages

journalctl -k Show kernel message log from the current boot

           -u            Show logs from the specified unit


service name to see log messages for any service, as in this example:

# journalctl -u NetworkManager.service

# journalctl -u httpd.service


very good examples in digital ocean community    

   

https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs




- - - - -  - - - - - -    - - - - -  -     - - - - - - 

another in depth-area of linux is security tools

A Linux Basic Security tool is rootkit hunter

Rkhunter (Rootkit Hunter) is an open-source Unix/Linux based scanner tool for Linux systems released under GPL that scans backdoors, rootkits, and local exploits on your systems.


https://www.vultr.com/docs/how-to-install-rkhunter-on-ubuntu

https://www.tecmint.com/install-rootkit-hunter-scan-for-rootkits-backdoors-in-linux/

Σάββατο 4 Δεκεμβρίου 2021

top 10 oracle dba questions

 Gathering Top 10 oracle dba questions according to my estimation and so far experience from dba tasks

1.What is the most important component of oracle database?

Answer:Init file

2.What is an index?

An index is a database structure that provides quick lookup of data in a column or columns of a table.

3.what is the scope of the index?

Indexes are used in Oracle to provide quick access to rows in a table. 

Indexes provide faster access to data for operations that return a small portion of a table's rows. 

Although Oracle allows an unlimited number of indexes on a table, the indexes only help if they are used to speed up queries.

4.what is PMON?

https://docs.oracle.com/cd/B19306_01/server.102/b14220/process.htm#i24686

5.where can I see oracle database diagnostics

6.What are the physical components of Oracle Database?

7. What are datafiles?

8.What does ACID mean in Database Systems?

9.The main function(s) of the redo log is?

10. What are the contents of the control file?


Παρασκευή 3 Δεκεμβρίου 2021

TAR vs GZIP vs zip

 TAR vs GZIP vs zip


tar in itself just bundles files together (the result is called a tarball), 

while zip applies compression as well. 

Usually you use gzip along with tar to compress the resulting tarball,

 thus achieving similar results as with zip 

1. tar,zip  command examples

Create a new tar archive.


$ tar cvf archive_name.tar dirname/



Extract from an existing tar archive.

$ tar xvf archive_name.tar


View an existing tar archive.

$ tar tvf archive_name.tar

-------------------------------

GZIP

Gzip is one of the most popular compression algorithms that allow you to reduce the size of a file and keep the original file mode, 

ownership, and timestamp.

Gzip uses the Lempel-Ziv algorithm used in zip and PKZIP. The amount of compression obtained depends on the size of the input and 

the distribution of common substrings. Typically, text such as source code or English is reduced by 60-70%. Compression is generally 

much better than that achieved by LZW (as used in compress), Huffman coding (as used in pack), or adaptive Huffman coding (compact).

For example, to get maximum compression, you would run:


gzip -9 filename


-- -- --

zip unzip

ZIP is an archiving and compression tool, all in one, while Gzip needs the help of Tar command to archive files.


install:$ sudo apt install zip unzip

$zip myfile.zip filename.txt

zip -r filename.zip folder

zip -r filename.zip folder1 folder2

Extracting files from zip file 


Unzip will list, test, or extract files from a ZIP archive, commonly found on Unix systems. The default behavior (with no options) is to extract into the current directory (and sub-directories below it) all files from the specified ZIP archive.




Syntax :

$unzip myfile.zip 

New cycle of this blog

 Hello all,

after several years as a technical support engineer,I am beginning a new cycle of this blog with scope to maintain and share in this blog thoughts and experience on several aspects of IT.

Areas of interest oracle database administration,aws, linux etc

BR Tolis