在Jenkins中使用AWS命令获取EC2实例的CPU利用率的最佳方法是什么

时间:2018-07-26 14:18:34

标签: amazon-ec2 aws-cli

我正在编写一个Jenkins作业以显示特定时间的CPU利用率,并且我的Jenkins作业能够使用AWS cli处理AWS命令。

有没有一种简单的方法可以获取CPU利用率?

1 个答案:

答案 0 :(得分:0)

#:kivy 1.11.0 <Menu>: manager: screen_manager orientation: "vertical" id: action ActionBar: size_hint_y: 0.1 background_color: 0, 0, 1000, 10 background_normal: "" ActionView: ActionPrevious: ActionButton: id: near_users icon: 'icons/internet.png' disabled: True if root.access_denied else False on_press: root.manager.current = 'near_users' ActionButton: id: matching_bar text: "Matching" disabled: True if root.access_denied else False on_press: root.manager.current= 'match' ActionButton: id: chat text: "chat" disabled: True if root.access_denied else False on_press: root.manager.current = 'chats' ActionButton: id: profile text: "Profile" disabled: True if root.access_denied else False on_press: root.manager.current = 'profile' Manager: id: screen_manager <ScreenLogIn>: orientation: "vertical" id: login_screen BoxLayout: TextInput: id: login TextInput: id: passw password: True # hide password Button: text: "Log In" on_release: root.verify_credentials() <ScreenNearUsers>: ScrollView: GridLayout: id: grid size_hint_y: None height: self.minimum_height cols: 2 row_default_height: '20dp' row_force_default: True spacing: 0, 0 padding: 0, 0 <ScreenMatch>: Button: text: <ScreenChats>: Button: text: "stuff3" <ScreenUserProfile>: Button: text: "stuff4" <Manager>: screen_log_in: screen_log_in screen_near_users: screen_near_users screen_match: screen_match screen_chats: screen_chats screen_user_profile: screen_user_profile ScreenLogIn: id: screen_log_in name: 'login' ScreenNearUsers: id: screen_near_users name: 'near_users' ScreenMatch: id: screen_match name: 'match' ScreenChats: id: screen_chats name: 'chats' ScreenUserProfile: id: screen_user_profile name: 'profile' 命令可提供EC2实例的CPU利用率。

请参阅以下提供CPU使用率的命令

aws get-metric-statistics