]> git.proxmox.com Git - pve-cluster.git/blame - data/PVE/test1.pl
pvecm: module cleanup: remove unused modules
[pve-cluster.git] / data / PVE / test1.pl
CommitLineData
fe000966
DM
1#!/usr/bin/perl -w -T
2
3use strict;
4
5use PVE::Cluster;
6use PVE::INotify;
7use PVE::AccessControl;
8use Data::Dumper;
9
10
11my $nodename = PVE::INotify::nodename();
12PVE::Cluster::log_msg(1, "ident2", "msg1 öäü");
13PVE::Cluster::log_msg(1, "root\@pam", "msg1 öäü");
14#print PVE::Cluster::get_system_log(undef, 0);
15exit 0;
16
17#print PVE::Cluster::get_system_log(undef, 0);
18
19#PVE::Cluster::cfs_update();
20
21#my $res = PVE::Cluster::get_vmlist();
22#print "TEST1: " . Dumper($res->{ids});
23
24#exit 0;
25
26while (1) {
27
28
29 print "update start\n";
30 PVE::Cluster::cfs_update();
31 print "update end\n";
32
33 my $res = PVE::Cluster::rrd_dump();
34 print "RRDDATA:" . Dumper($res);
35
36 #my $res = PVE::Cluster::cfs_file_version('user.cfg');
37 #print "VER $res\n";
38
39 sleep(1);
40}
41exit 0;
42
43my $loopcount = 0;
44
45
46while (1) {
47
48 PVE::Cluster::update();
49
50 PVE::Cluster::broadcast_vminfo({ count => $loopcount});
51
52 my $res = PVE::Cluster::get_vminfo($nodename);
53 print "TEST1: " . Dumper($res);
54
55 if (defined($res = PVE::Cluster::get_config("cluster.conf"))) {
56 print "TEST2: " . Dumper($res);
57 } else {
58 warn "get_config failed: $!\n";
59 }
60
61 $loopcount++;
62
63 sleep(2);
64}
65