Commit Graph

29 Commits

Author SHA1 Message Date
Derek Collison
3173d435b1 Initial support for zOS (#4209)
zOS is an IBM Z (mainframe) operating system. In the days of yore, it
was MVS.

 - [ ] Link to issue, e.g. `Resolves #NNN`
 - [ ] Documentation added (if applicable)
 - [ ] Tests added
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
 - [x] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)

Resolves - the inability to build on zOS.

### Changes proposed in this pull request:

 - This PR adds a couple of files to allow building nats-server on zOS.
2023-07-18 12:21:31 -07:00
v1gnesh
283d9197d0 Update copyright year in pse_zos.go 2023-06-04 08:56:59 +05:30
v1gnesh
fa2567a166 Initial support for zOS
zOS is an IBM Z (mainframe) operating system. In the days of yore, it was MVS.

Signed-off-by: v1gnesh <v1gnesh@users.noreply.github.com>
2023-06-03 10:03:23 +05:30
Derek Collison
12d49a87c8 Merge branch 'main' into dev 2023-01-27 08:35:59 -08:00
Chengjun Xie
6cbca6b783 Add support for dragonfly bsd.
Simply copy the pse implementation for openbsd.
2023-01-27 10:43:30 +08:00
Matthias Petermann
51c23ab145 [ADDED] Ability to build on NetBSD 2022-10-28 17:59:07 +02:00
Ivan Kozlovic
3c9a7cc6e5 Move to Go 1.19, remote io/util, fix data race and a flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-08-05 09:55:37 -06:00
Neil Alexander
546d8a5729 Update copyrights, build tags 2022-07-05 09:33:12 +01:00
Neil Alexander
a8dbac4884 Stubs for WebAssembly 2022-07-05 09:28:00 +01:00
Ivan Kozlovic
f805f23d6e Travis updates
- Add Go 1.17
- Fix go fmt from Go 1.17 (build directives)
- Download version of misspell and staticcheck instead of doing
"go get" since current staticcheck would be broken without go.mod

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-11-15 17:23:08 -07:00
Derek Collison
361af54f51 Remove external dependency on 'ps' for memory and cpu usage.
Signed-off-by: Derek Collison <derek@nats.io>
2021-06-06 11:13:32 -07:00
Phil Pennock
bc6c433142 FreeBSD fixes: %cpu scale; no-cgo for amd64
It would be convenient if we did not need to use cgo to compile for
FreeBSD for common architectures, allowing builds to be generated in
Linux CI flows.

The sysctl interface uses offsets which can vary by build architecture,
so doing this in the general case without cgo is not realistic.  But we
can front-load the C work to get the offsets for a given architecture,
then use encoding/binary at run-time.

While doing this, I saw that the existing FreeBSD code was
mis-calculating `%cpu` by converting the `fixpt_t` scaled int straight
to a double without dividing by the scaling factor, so we also fix for
all other architectures by introducing a division by `FSCALE`.

The offsets-emitting code is in `freebsd.txt`, with the filename chosen
to keep the Go toolchain from picking it up and trying to compile.

The result is unsafe-free cgo-free builds for FreeBSD/amd64.
2020-11-24 23:04:50 -05:00
Guangming Wang
9a003ba042 fix string trim func usage in pse
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-10-15 23:55:13 +08:00
Derek Collison
6584a9a828 lint updates
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:41:38 -07:00
Gabriel Guzman
f7f333ed2f Update 2018-03-29 11:48:09 -04:00
Gabriel Guzman
a29b08073e Add pse file for openbsd 2018-03-29 09:41:45 -04:00
Derek Collison
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Ivan Kozlovic
09f4b85a66 [ADDED] Ability to get the server's HTTP Handler
This will allow applications (for instance NATS Streaming Server)
to add new endpoints to the NATS http server.

Resolves #480
2017-04-27 16:37:01 -06:00
Ivan Kozlovic
d21210e0e9 [FIXED] PS test to reduce failures in some situations
Added garbage collection before each capture method and bump the
delta threshold to 1MB.

Resolves #310
2016-07-18 13:00:49 -06:00
Derek Collison
8558c8e4c5 Merge pull request #300 from nats-io/authorization
Authorization
2016-06-20 09:26:10 -07:00
Derek Collison
fa95bd936b spelling 2016-06-17 10:09:14 -07:00
Ian Eyberg
b5a30be37c . 2016-06-13 10:07:28 -07:00
Ian Eyberg
9d5c5ba1a8 rumprun support 2016-06-13 09:29:40 -07:00
Colin Sullivan
26dab3bf8a Update PSE for Windows
* Call into the performance counter API directly
* Incorporate caching to reduce load on the server
2016-05-05 23:31:05 -06:00
Derek Collison
137c2d0109 Add sampling for pcpu 2016-05-05 13:55:23 -07:00
Colin Sullivan
79b4e6be10 While locally tested, this test wasn't being run with the original enhancement.
* Include the test for windows
* Call ProcUsage (versus procUsage), as test was moved.
2016-05-02 15:25:07 -06:00
Ivan Kozlovic
7a43747107 Remove comment 2016-04-22 07:45:20 -06:00
Ivan Kozlovic
bff3603606 Fix Windows build
Code referenced Debugf which is not available in this package
2016-04-21 18:34:24 -06:00
Derek Collison
5bea74c2ed Rename and move some things around 2016-04-21 09:33:26 -07:00