How to Add Resources to a Scrutinizer EC2 Instance¶
As needs change, an instance could become over-utilized if it is too small. If this is the case, the size can be modified. For example, if an instance named t2.micro is resource strapped, it can be changed to an m3.medium instance. When an instance is resized, an instance type that is compatible with the configuration of the instance must be selected. If the instance type is not compatible with the instance configuration, the application must be migrated to a new instance.
- SSH to the instance
- Stop all of the services using the interactive Scrutinizer utility:
[ec2-user\@supportami ~]$ sudo su [root\@supportami ec2-user]# cd /home/plixer/scrutinizer/bin/ [root\@supportami bin]# ./scrut_util.exe Scrutinizer 22.214.171.124951 (Mon Nov 20 11:09:35 2017) scrut_util 126.96.36.199666 (2017-11-03 12:34:14 -0400 (Fri, 03 Nov 2017)) SCRUTINIZER> services all stop (stop) plixer_flow_collector ... DONE. (stop) httpd ... DONE. (stop) plixer_syslogd ... DONE. (stop) plixer_db ... DONE. Done (75.896102 seconds) SCRUTINIZER> quit Exiting...
- Power off the operating system:
[root\@supportami bin]# shutdown -h now
Open the Amazon EC2 console. In the navigation pane, choose Instances, and select the instance.
[EC2-Classic] If the instance has an associated Elastic IP address, write down the Elastic IP address and the instance ID shown in the details pane.
Choose Actions, select Instance State, and then choose Stop.
In the confirmation dialog box, choose Yes, Stop. It can take a few minutes for the instance to stop.
[EC2-Classic] When the instance state becomes stopped, the Elastic IP, Public DNS (IPv4), Private DNS, and Private IPs fields in the details pane are blank to indicate that the old values are no longer associated with the instance.
With the instance still selected, choose Actions, select Instance Settings, and then choose Change Instance Type. Note that this action is disabled if the instance state is not stopped.
From Instance Type, select the instance type desired. If the desired instance type does not appear in the list, then it is not compatible with the configuration of the instance (for example, because of virtualization type).
Choose Apply to accept the new settings.
To restart the stopped instance, select the instance, choose Actions, select Instance State, and then choose Start.
In the confirmation dialog box, choose Yes, Start. It can take a few minutes for the instance to enter the running state.
[EC2-Classic] When the instance state is running, the Public DNS (IPv4), Private DNS, and Private IPs fields in the details pane contain the new values that we assigned to the instance. If an instance had an associated Elastic IP address, it must be reassociated as follows:
In the navigation pane, choose Elastic IPs. Select the Elastic IP address that was written down in the above step before the instance was stopped. Choose Actions and then choose Associate address. From Instance, select the instance ID that was written down before the instance was stopped, then choose Associate.
SSH into the instance and use the interactive utility to retune the instance:
[root@supportami ec2-user]# cd /home/plixer/scrutinizer/bin/
[root@supportami bin]# ./scrut_util.exe
Scrutinizer 188.8.131.52951 (Mon Nov 20 11:09:35 2017)
scrut_util 184.108.40.206666 (2017-11-03 12:34:14 -0400 (Fri, 03 Nov 2017))
SCRUTINIZER> check tuning
SCRUTINIZER> set tuning