arco

package
v0.0.0-...-d7f25bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package arco provides functions for accessing a gridengine ARCo database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounting

type Accounting struct {
	JobNumber      int       `json:"jobNumber"`
	TaskNumber     int       `json:"taskNumber"`
	PETaskId       string    `json:"peTaskId"`
	Name           string    `json:"jobName"`
	Group          string    `json:"group"`
	Username       string    `json:"userName"`
	Account        string    `json:"account"`
	Project        string    `json:"project"`
	Department     string    `json:"department"`
	SubmissionTime time.Time `json:"submissionTime"`
	ARParent       int       `json:"arParent"`
	StartTime      time.Time `json:"startTime"`
	EndTime        time.Time `json:"endTime"`
	WallClockTime  int       `json:"wallClockTime"`
	CPU            float64   `json:"cpu"`
	Memory         float64   `json:"memory"`
	IO             float64   `json:"io"`
	IOWait         float64   `json:"ioWait"`
	MaxVMem        float64   `json:"maxVmem"`
	ExitStatus     int       `json:"exitStatus"`
	MaxRSS         int       `json:"maxRss"`
}

type DB

type DB struct {
	// contains filtered or unexported fields
}

func Open

func Open(url string) (*DB, error)

Open creates a new connection to the Arco database. URL is a Postgres connection string in the form:

"postgres://bob:secret@1.2.3.4:5432/mydb?option=value"

func (DB) Close

func (d DB) Close() error

func (DB) QueryAccounting

func (d DB) QueryAccounting(j int) ([]Accounting, error)

QueryAccounting queries the view_accounting view for accounting information for a job number j. It returns accounting records for all tasks.

func (DB) QueryAccountingTask

func (d DB) QueryAccountingTask(j, t int) (*Accounting, error)

QueryAccountingTask queries the view_accounting view for accounting information of a task t of a job j.

func (DB) QueryAccountingTimes

func (d DB) QueryAccountingTimes(start, end time.Time) ([]Accounting, error)

QueryAccountingTimes queries the view_accounting view for all accounting records of jobs that ran in a given time period.

func (DB) QueryJob

func (d DB) QueryJob(n int) (*Job, error)

QueryJob queries the job table for information about a job number

func (DB) QueryLogs

func (d DB) QueryLogs(j, t int) ([]Log, error)

QueryLogs returns a list of all log entries for a job and task number. A task number of -1 returns a log summary for an array job.

func (DB) QueryRequest

func (d DB) QueryRequest(j int) (Request, error)

type Job

type Job struct {
	JobNumber      int       `json:"jobNumber"`
	TaskNumber     int       `json:"taskNumber"`
	PETaskId       string    `json:"peTaskId"`
	JobName        string    `json:"jobName"`
	Group          string    `json:"group"`
	Owner          string    `json:"owner"`
	Account        string    `json:"account"`
	Priority       string    `json:"priority"`
	SubmissionTime time.Time `json:"submissionTime"`
	Project        string    `json:"project"`
	Department     string    `json:"department"`
}

type Log

type Log struct {
	JobNumber  int       `json:"jobNumber"`
	TaskNumber int       `json:"taskNumber"`
	PETaskId   int       `json:"peTaskId"`
	JobName    string    `json:"jobName"`
	User       string    `json:"user"`
	Account    string    `json:"account"`
	Project    string    `json:"project"`
	Department string    `json:"department"`
	Time       time.Time `json:"time"`
	Event      string    `json:"event"`
	State      string    `json:"state"`
	Initiator  string    `json:"initiator"`
	Host       string    `json:"host"`
	Message    string    `json:"message"`
}

type Request

type Request map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL