9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4858522
27 * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuTime()
28 * @author Steve Bohne
29 * @modules jdk.management
30 */
31
32 /*
33 * This test is just a sanity check and does not check for the correct
34 * value. The correct value should be checked manually:
35 * Solaris/Linux:
36 * 1. In a shell, enter the command: "ps -ef"
37 * 2. The value (reported in seconds) is in the "TIME" column for the process
38 * Windows NT/XP/2000:
39 * 1. Hit Ctrl-Alt-Delete, select Task Manager, select Processes tab
40 * 2. The value (reported in seconds) is in the "CPU Time" column for the
41 * process. You may have to add this column via View menu-> Select
42 * Columns... item.
43 * Windows 98/ME:
44 * Not supported.
45 */
46
47 import com.sun.management.OperatingSystemMXBean;
48 import java.lang.management.*;
49
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4858522
27 * @summary Basic unit test of OperatingSystemMXBean.getProcessCpuTime()
28 * @author Steve Bohne
29 */
30
31 /*
32 * This test is just a sanity check and does not check for the correct
33 * value. The correct value should be checked manually:
34 * Solaris/Linux:
35 * 1. In a shell, enter the command: "ps -ef"
36 * 2. The value (reported in seconds) is in the "TIME" column for the process
37 * Windows NT/XP/2000:
38 * 1. Hit Ctrl-Alt-Delete, select Task Manager, select Processes tab
39 * 2. The value (reported in seconds) is in the "CPU Time" column for the
40 * process. You may have to add this column via View menu-> Select
41 * Columns... item.
42 * Windows 98/ME:
43 * Not supported.
44 */
45
46 import com.sun.management.OperatingSystemMXBean;
47 import java.lang.management.*;
48
|