Created
January 10, 2017 11:14
-
-
Save salami-art/1e74801e506bfc31384c28f35a3f6de6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@ip-172-31-18-106:~$ instanceid=`curl http://169.254.169.254/latest/meta-data/instance-id` | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 19 100 19 0 0 14393 0 --:--:-- --:--:-- --:--:-- 19000 | |
ubuntu@ip-172-31-18-106:~$ pid=`ps -U solr h | awk '{print $1}'` | |
ubuntu@ip-172-31-18-106:~$ num_files=`sudo ls /proc/$pid/fd |wc -l` | |
ubuntu@ip-172-31-18-106:~$ aws cloudwatch put-metric-data --metric-name SolrOpenFileHandles\ --value $num_files --namespace "EC2" --region eu-central-1\ --dimensions "InstanceId=$instanceid" | |
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] | |
To see help text, you can run: | |
aws help | |
aws <command> help | |
aws <command> <subcommand> help | |
Unknown options: InstanceId=i-0ca0d93973e02a973, 2285 | |
ubuntu@ip-172-31-18-106:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment