class StatusReporter {

	public static String getStatusReport() {
		LoggingService.logInfo(MODULE_NAME, "Getting Status Report");
		StringBuilder result = new StringBuilder();

		Calendar cal = Calendar.getInstance();
		cal.setTimeInMillis(statusReporterStatus.getSystemTime());
		SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm a");

		float diskUsage = resourceConsumptionManagerStatus.getDiskUsage();
   
		double availableDisk = resourceConsumptionManagerStatus.getAvailableDisk() / 1024. / 1024.;
		double availableMemory = resourceConsumptionManagerStatus.getAvailableMemory() / 1024. / 1024.;
		float totalCpu = resourceConsumptionManagerStatus.getTotalCpu();
     
		String connectionStatus = "";

		switch (fieldAgentStatus.getControllerStatus()) {
			case NOT_PROVISIONED:
				connectionStatus = "not provisioned";
				break;
			case BROKEN_CERTIFICATE:
				connectionStatus = "broken certificate";
				break;
			case OK:
				connectionStatus = "ok";
				break;
			default:
				connectionStatus = "not connected";
				break;
		}

		result.append("ioFog daemon                : ").append(supervisorStatus.getDaemonStatus().name());
		result.append("\\nMemory Usage                : about ").append(String.format("%.2f MiB", resourceConsumptionManagerStatus.getMemoryUsage()));
		if (diskUsage < 1)
			result.append("\\nDisk Usage                  : about ").append(String.format("%.2f MiB", diskUsage * 1024));
		else
			result.append("\\nDisk Usage                  : about ").append(String.format("%.2f GiB", diskUsage));
		result.append("\\nCPU Usage                   : about ").append(String.format("%.2f %%", resourceConsumptionManagerStatus.getCpuUsage()));
		result.append("\\nRunning Microservices       : ").append(processManagerStatus.getRunningMicroservicesCount());
		result.append("\\nConnection to Controller    : ").append(connectionStatus);
		result.append(String.format(Locale.US, "\\nMessages Processed          : about %,d", messageBusStatus.getProcessedMessages()));
		result.append("\\nSystem Time                 : ").append(dateFormat.format(cal.getTime()));

		result.append("\\nSystem Available Disk       : ").append(String.format("%.2f MB (%.2f %%)", availableDisk, ((availableDisk * Constants.MiB) / getTotalDisk()) * 100.0f));
		result.append("\\nSystem Available Memory     : ").append(String.format("%.2f MB", availableMemory));
		result.append("\\nSystem Total CPU            : ").append(String.format("%.2f %%", totalCpu));

		LoggingService.logInfo(MODULE_NAME, "Finished Getting Status Report : " + result.toString());
		return result.toString();
	}

	private  StatusReporter();

}