iOS?豸?????????????С????
???????????? ???????[ 2015/6/23 14:11:02 ] ????????iOS ???????
??????????У?????????鱻??app???????????????????????????ú?cpu?????????????????д??????????С?????????????????????
????IOS????????UNIX??????????????ssh?????????top????????????????????????????????????????ios?豸???????OpenSSH?????top??????????????xshell????????????????????????top?????????£?
?????????????????????£?
????1??????1???????е???????????緢??????????-???-??????-????????
????2?????????app????????????磺app1??app2
????2???????1??cpu????????????
????2???????????????
????3???????1????ios?豸????ssh????
????2?????app1???????????????棬????????????????top?????app1????????
????3??????top???????????cpu??????????????????洢??list1??
????4?????app2?????2????3??????裬????洢??list2??
????5????list1??list2?е?cpu???????????????????????????????????????????
???????? ????jar????
????1??ganymed-ssh2-build251?????ssh2Э????????????
????2??jfreechart-1.0.19?????????
?????????????????????????
????1???????????
????connection = new Connection(hostname?? port);
????connection.connect();
????boolean isAuthenticated = connection.authenticateWithPassword(username?? password);
????if (isAuthenticated == false)
????{
????throw new IOException("Authentication failed.");
????}
????2?????????????????
????Session sess = connection.openSession();
????sess.execCommand("top -l 2");
????InputStream stdout = new StreamGobbler(sess.getStdout());
????BufferedReader br = new BufferedReader(new InputStreamReader(stdout));
????????top -l 2?????????ν???????????????????????????μ?????????
????3????top????а????app?????????????????????????飬???ж?????????????app???????????????????????y??%CPU????????0.0%???????????top???????????????????н????%CPU?????0.0%?????????μ?????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11