Tuesday, December 27, 2022

Jupyter installation

 

Step 1:

upgrade the pip3

apt-get install python3-pip

sudo pip3 install --upgrade pip 
 
Step 2:
 
Create virtual environment
 
sudo pip3 install virtualenv
 
pip3 install virtualenv
 
mkdir demo
cd demo
virtualenv mynotebookenv
source mynotebookenv/bin/activate 
 
Step 3:
install the jupyter 
pip install jupyter
jupyter notebook

Friday, November 25, 2022

JMeter Heap Size increase

 

Open the jmeter.bat  file and then add following


HEAP=-Xms1g -Xmx1g


Change to 12GB following like this


HEAP=-Xms12g -Xmx12g

Sunday, November 20, 2022

JAVA Path and JAVA_HOME Path Setting in Linux

 


  1. Open the Terminal

  2. Prepend sudo if logged in as not-privileged user, ie. sudo nano

  3. nano /etc/profile

  4. Press 'i' to get in insert mode
  5. add following :

    export JAVA_HOME="path that you found"
    
    export PATH=$JAVA_HOME/bin:$PATH
    
  6. logout and login again, reboot, or use source /etc/profile to apply changes immediately in your current shell

Monday, October 17, 2022

Running Simple Web Server on Python 2 and Python 3

 



Running Simple Web Server on Python 2


python -m SimpleHTTPServer 8000



Running Simple Web Server on Python 3


python -m http.server 8000

Friday, September 23, 2022

Getting Wazuh Agent key from Wazuh Server

 TOKEN=$(curl -u "<username>:<password>" -k -X GET "https://<hostname or ip address>:<port number>/security/user/authenticate?raw=true")



curl -k -X POST -d '{"name":"<agentname>"}' "https://<hostname or ip address>:<port number>/agents?pretty=true" -H "Content-Type:application/json" -H "Authorization: Bearer $TOKEN"

Wednesday, September 21, 2022

Kibana: NoShardsAvailable Error Solved

 Most likely your Kibana shards are not allocated. 

You can check if some or all of your shards are UNASSIGNED using curl -XGET <host>:9200/_cat/shards?v.


In Dev Tools in Kibana:

GET /_cat/shards?v


I have deleted the UNASSIGNED Status index from Kibana Now the Error is resolved


Monday, July 4, 2022

Log rotate error :error: skipping "log file name or path of the file" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

 Error Description:

error: skipping "<log file name>" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.


Answer

su <user> <group>

Thursday, March 3, 2022

Selection of Specific Characters from Given Text or Word

 

To select the "XX" characters 

issue the following command

 

echo "C2312GGG999XXL0021"|cut -c 12-13`

Thursday, February 24, 2022

JMeter JSON Extractor

      json response {"Key1":"Value1","Key2":"Value2","Key2":"Value2"}  Name of t...