Examples of Machine


Examples of at.tuwien.minimee.model.Machine

     */
    protected void collectData(ToolConfig config, long time, MigrationResult result){
       
        // overwrite this to collect additional performance data and
        // add it to the measurements of MigrationResult
        Machine m = ToolRegistry.getInstance().getMachine(machine);

        for (MeasurableProperty property: getMeasurableProperties()) {
            if (property.getName().startsWith("machine:")) {
                Measurement measurement = new Measurement();
                measurement.setProperty(property);
                FreeStringValue v =(FreeStringValue) property.getScale().createValue();
                if (property.getName().equals(Machine.MACHINE_NAME)) {
                    v.setValue(m.getId());
                } else if (property.getName().equals(Machine.MACHINE_OS)) {
                    v.setValue(m.getOperatingSystem());
                } else if (property.getName().equals(Machine.MACHINE_CPUS)) {
                    v.setValue(m.getCpus());
                } else if (property.getName().equals(Machine.MACHINE_CPUCLOCK)) {
                    v.setValue(m.getCpuClock());
                } else if (property.getName().equals(Machine.MACHINE_CPUTYPE)) {
                    v.setValue(m.getCpuType());
                } else if (property.getName().equals(Machine.MACHINE_MEMORY)) {
                    v.setValue(m.getMemory());
                }
                measurement.setValue(v);
                result.getMeasurements().put(property.getName(), measurement);
            }
        }       
View Full Code Here

Examples of ca.teamdave.caruso.Machine

     * @param args the command line arguments
     */
    public static void main(String[] args) throws CarusoException {

        Logger logger = new LiveGraphLogger("/home/leigh/.myDat", "/home/leigh/LiveGraph.1.14.Application.bin/LiveGraph.1.14.Application.bin.jar");
        Machine machine = new Machine(logger);

        Controller controller = new LinearRobotController();
        AbstractRobot robot = new LinearRobotSimulated();

        Caruso caruso = new Caruso(controller, machine, robot);
View Full Code Here

Examples of com.axemblr.provisionr.api.pool.Machine

    public void execute(DelegateExecution execution) throws Exception {
        Pool pool = (Pool) execution.getVariable(CoreProcessVariables.POOL);
        checkNotNull(pool, "Please add the pool description as a process " +
            "variable with the name '%s'.", CoreProcessVariables.POOL);

        Machine machine = (Machine) execution.getVariable("machine");
        checkNotNull(machine, "expecting a process variable named 'machine'");

        LOG.info(">> Connecting to machine {} to run puppet script", machine);

        SSHClient client = Ssh.newClient(machine, overrideAdminAccess(pool));
        try {
            for (Map.Entry<String, String> entry : createAdditionalFiles(pool, machine).entrySet()) {
                Ssh.createFile(client, /* content = */ entry.getValue(), 0600, /* destination= */ entry.getKey());
            }

            final String destination = "/tmp/" + remoteFileName + ".pp";
            Ssh.createFile(client, createPuppetScript(pool, machine), 0600, destination);

            Session session = client.startSession();
            try {
                session.allocateDefaultPTY();

                // TODO: extract this loop outside of this activity (probably using a business process error)
                final String runScriptWithWaitCommand = "while ! which puppet &> /dev/null ; " +
                    "do echo 'Puppet command not found. Waiting for userdata.sh script to finish (10s)' " +
                    "&& sleep 10; " +
                    "done " +
                    "&& sudo puppet apply --detailed-exitcodes --debug --verbose " + destination;
                Session.Command command = session.exec(runScriptWithWaitCommand);

                Ssh.logCommandOutput(LOG, machine.getExternalId(), command);
                command.join();

                final Integer exitStatus = command.getExitStatus();
                if (exitStatus != PUPPET_FINISHED_WITH_NO_FAILURES && exitStatus != 0) {
                    throw new RuntimeException(String.format("Failed to execute puppet. " +
View Full Code Here

Examples of com.dianping.cat.consumer.event.model.entity.Machine

      graph.setDomain(domainName);
      graph.setName(reportName);
      graph.setPeriod(reportPeriod);
      graph.setType(3);
      graph.setCreationDate(creationDate);
      Machine machine = eventReport.getMachines().get(ip);
      Map<String, EventType> types = machine.getTypes();
      StringBuilder detailBuilder = new StringBuilder();
      StringBuilder summaryBuilder = new StringBuilder();
      for (Entry<String, EventType> eventEntry : types.entrySet()) {
        EventType eventType = eventEntry.getValue();
        long[] typeCounts = new long[60];
View Full Code Here

Examples of com.dianping.cat.consumer.heartbeat.model.entity.Machine

  public DisplayHeartbeat display(HeartbeatReport report, String ip) {
    if (report == null) {
      return this;
    }
    Machine machine = report.getMachines().get(ip);
    if (machine == null) {
      return this;
    }

    List<Period> periods = machine.getPeriods();
    int size = periods.size();

    for (; size > 0; size--) {
      Period period = periods.get(size - 1);
      int minute = period.getMinute();
View Full Code Here

Examples of com.dianping.cat.consumer.problem.model.entity.Machine

  public void process(MessageTree tree) {
    String domain = tree.getDomain();
    ProblemReport report = m_reportManager.getHourlyReport(getStartTime(), domain, true);

    report.addIp(tree.getIpAddress());
    Machine machine = report.findOrCreateMachine(tree.getIpAddress());

    for (ProblemHandler handler : m_handlers) {
      handler.handle(machine, tree);
    }
  }
View Full Code Here

Examples of com.dianping.cat.consumer.state.model.entity.Machine

  public void visitMachine(Machine machine) {
    String ip = machine.getIp();
    m_currentIp = ip;

    if (m_total == null) {
      m_total = new Machine();
      m_total.setIp(ip);
    }
    if (m_ip.equals(Constants.ALL) || m_ip.equalsIgnoreCase(ip)) {
      m_total = mergerMachine(m_total, machine);
      super.visitMachine(machine);
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.Machine

      graph.setDomain(reportDomain);
      graph.setName(reportName);
      graph.setPeriod(reportPeriod);
      graph.setType(3);
      graph.setCreationDate(creationDate);
      Machine machine = report.findOrCreateMachine(ip);
      Map<String, TransactionType> types = machine.getTypes();
      StringBuilder detailBuilder = new StringBuilder();
      StringBuilder summaryBuilder = new StringBuilder();
      for (Entry<String, TransactionType> transactionEntry : types.entrySet()) {
        TransactionType transactionType = transactionEntry.getValue();
        long[] typeCounts = new long[60];
View Full Code Here

Examples of com.elastisys.scale.cloudadapers.api.types.Machine

    if (privateIp != null) {
      privateIps.add(privateIp);
    }

    JsonObject metadata = JsonUtils.toJson(instance).getAsJsonObject();
    return new Machine(id, state, launchtime, publicIps, privateIps,
        metadata);
  }
View Full Code Here

Examples of eu.ha3.matmos.engine.core.implem.Machine

              entry.getKey(), this.providers.getMachine(), this.providers.getReferenceTime(), events,
              serial.delay_fadein, serial.delay_fadeout, serial.fadein, serial.fadeout);
        }
       
        Named element =
          new Machine(
            entry.getKey(), this.providers.getJunction(), asList(serial.allow), asList(serial.restrict),
            tie, stream);
        this.elements.add(element);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.