An open API service indexing awesome lists of open source software.

https://github.com/metrumresearchgroup/gogridengine

Serialization for Sun Grid Engine QStat XML Output
https://github.com/metrumresearchgroup/gogridengine

gridengine serialization serialization-library sun

Last synced: 18 days ago
JSON representation

Serialization for Sun Grid Engine QStat XML Output

Awesome Lists containing this project

README

          

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=metrumresearchgroup_gogridengine&metric=alert_status)](https://sonarcloud.io/dashboard?id=metrumresearchgroup_gogridengine)

[![Coverage Status](https://coveralls.io/repos/github/metrumresearchgroup/gogridengine/badge.svg)](https://coveralls.io/github/metrumresearchgroup/gogridengine)

# SunGrid Engine Serialization

This library will allow you to take the SGE XML output from queue status and serialize it programmatically into Go objects. As a note, natively unserializing will provide a ResourceList object containing all of the dynamic resources serialized into strings.

That's not exactly sane for programming, so several helper / receiver methods have been added to the ReceiverList allowing you to get structured values back for the important ones.

# Example

```
source := `



all.q@magicalhostname
BIP
32
0
36
31.63000
lx-amd64
31.630000
31.700000
31.630000
31.680000
lx-amd64
36
57.353G
0.000
57.353G
58.973G
0.000
58.973G
1.619G
0.000
1.619G
89.100000
SCTTCTTCTTCTTCTTCTTCTTCTTCTTSCTTCTTCTTCTTCTTCTTCTTCTTCTT
SCTTCTTCTTCTTCTTCTTCTTCTTCTTSCTTCTTCTTCTTCTTCTTCTTCTTCTT
2
18
36
0.878611
0.880556
0.878611
0.880000
all.q
ip-172-16-2-102.us-west-2.compute.internal
4
/tmp
0
0.000000
NONE
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
infinity
00:05:00

4282
0.50500
Run478
user
r
2019-09-15T15:26:36
1





`

var info JobInfo
xml.Unmarshal([]byte(source), &info)
```

#Environment Variables
GOGRIDENGINE_TEST : If set to "true", will trigger test mode where the library will look to generated content and not try to use qstat
GOGRIDENGINE_TEST_SOURCE: If set, should be a URL to XML from `qstat -xml` output which will be used for testing