Thursday, 29 August 2019

How to find the list of all the large files in the system [/dev/xvda1/ is 100% full error]

Hi All,

You might have seen this error xvda1 is 100% full and might have felt the need to check what are the files that are occupying so much space.

You can get this information and write to an output file via below command:

sudo find / -type f -size +500M -exec ls -lh {} \; > largeFiles.txt

You can then remove the unwanted files using the rm command.

Enjoy!

Thursday, 8 August 2019

wsimport command not found error [SOLVED]

[Issue]

The wsimport tool is used to parse an existing WSDL [Web Services Description Language] file. And generate the required files ( i.e. JAX-WS portable artifacts) for web service client to access the published web services. 

This wsimport tool is normally present in the $JDK/bin folder.

[Root Cause]

So if the system is not able to find this command, this means that either the JAVA_HOME system variable is incorrectly configured or not present at all.

[Resolution]


Create the JAVA_HOME system variable as shown below and add “;%JAVA_HOME%\bin;” at the end of the PATH system variable:

Now the system will be able to find the wsimport command successfully!

How to create a list of the EC2 instances for any account

1. Find out the IP address of the jenkins slave for the particular account

2. Connect to this IP using putty using ec2-user

3. Switch to root using command : sudo -i

4. Run the below command to write the output to a text file :
[root@...] # aws ec2 describe-instances >> instancesDetails.txt

Similar command can be executed to output the list of AMIs as well, as shown below:
[root@...] # aws ec2 describe-images >> imagesDetails.txt

5. Now you can use the Data filter functionality of excel to just capture, say, IP address, instance id etc.

Another quick way to list out the IDs is as below,
1. Click on the Check box to the left of the Name field as shown below

2. This will select all the instances on the particular page
3. Navigate to bottom of the list section and you will see all the details in a notepad sort of window
4. You can copy all the details from here and paste it into notepad++ / excel
5. Enjoy!