Repository: joyent/statemap Branch: master Commit: 04cc10f4c526 Files: 30 Total size: 342.1 KB Directory structure: gitextract_6twupnbu/ ├── .gitmodules ├── AUTHORS ├── Cargo.toml ├── LICENSE ├── README.md ├── contrib/ │ ├── cpu-statemap-tagged.d │ ├── cpu-statemap.d │ ├── io-statemap.d │ ├── lx-cmd-statemap.d │ ├── lx-statemap.d │ ├── postgres-statemap.d │ ├── postgres-zfs-statemap.d │ ├── spa-sync-statemap.d │ └── vdev-statemap.d ├── src/ │ ├── icons/ │ │ ├── LICENSE │ │ └── README.md │ ├── main.rs │ ├── statemap-svg.css │ ├── statemap-svg.defs │ ├── statemap-svg.js │ └── statemap.rs └── tst/ ├── tst.bad_line_basic.err ├── tst.bad_line_basic.in ├── tst.bad_line_newline.err ├── tst.bad_line_newline.in ├── tst.bad_line_whitespace.err ├── tst.bad_line_whitespace.in ├── tst.io.in ├── tst.tag_basic.in └── tst.tag_redefined.in ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitmodules ================================================ [submodule "deps/javascriptlint"] path = deps/javascriptlint url = git://github.com/davepacheco/javascriptlint.git [submodule "deps/jsstyle"] path = deps/jsstyle url = git://github.com/davepacheco/jsstyle.git ================================================ FILE: AUTHORS ================================================ # Statemap authors, ordered by first contribution Bryan Cantrill David Tolnay ================================================ FILE: Cargo.toml ================================================ [package] name = "statemap" version = "0.1.0" authors = ["Bryan Cantrill "] [dependencies] getopts = "0.2" memmap = "0.6" serde = "1.0" serde_json = "1.0" serde_derive = "1.0" natord = "1.0.9" palette = "0.4" rand = "0.5" ================================================ FILE: LICENSE ================================================ Mozilla Public License Version 2.0 ================================== 1. Definitions -------------- 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. 1.3. "Contribution" means Covered Software of a particular Contributor. 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. 1.5. "Incompatible With Secondary Licenses" means (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. 1.6. "Executable Form" means any form of the work other than Source Code Form. 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" means this document. 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. 1.10. "Modifications" means any of the following: (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or (b) any new file in Source Code Form that contains any Covered Software. 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. 1.13. "Source Code Form" means the form of the work preferred for making modifications. 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. License Grants and Conditions -------------------------------- 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. 2.2. Effective Date The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. 2.3. Limitations on Grant Scope The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: (a) for any code that a Contributor has removed from Covered Software; or (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). 2.5. Representation Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. 2.6. Fair Use This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities ------------------- 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. 3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then: (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). 3.4. Notices You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation --------------------------------------------------- If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination -------------- 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ * * * 6. Disclaimer of Warranty * * ------------------------- * * * * Covered Software is provided under this License on an "as is" * * basis, without warranty of any kind, either expressed, implied, or * * statutory, including, without limitation, warranties that the * * Covered Software is free of defects, merchantable, fit for a * * particular purpose or non-infringing. The entire risk as to the * * quality and performance of the Covered Software is with You. * * Should any Covered Software prove defective in any respect, You * * (not any Contributor) assume the cost of any necessary servicing, * * repair, or correction. This disclaimer of warranty constitutes an * * essential part of this License. No use of any Covered Software is * * authorized under this License except under this disclaimer. * * * ************************************************************************ ************************************************************************ * * * 7. Limitation of Liability * * -------------------------- * * * * Under no circumstances and under no legal theory, whether tort * * (including negligence), contract, or otherwise, shall any * * Contributor, or anyone who distributes Covered Software as * * permitted above, be liable to You for any direct, indirect, * * special, incidental, or consequential damages of any character * * including, without limitation, damages for lost profits, loss of * * goodwill, work stoppage, computer failure or malfunction, or any * * and all other commercial damages or losses, even if such party * * shall have been informed of the possibility of such damages. This * * limitation of liability shall not apply to liability for death or * * personal injury resulting from such party's negligence to the * * extent applicable law prohibits such limitation. Some * * jurisdictions do not allow the exclusion or limitation of * * incidental or consequential damages, so this exclusion and * * limitation may not apply to You. * * * ************************************************************************ 8. Litigation ------------- Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous ---------------- This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License --------------------------- 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. 10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice ------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice --------------------------------------------------------- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. ================================================ FILE: README.md ================================================ # Statemap This repository contains the software for rendering _statemaps_, a software visualization in which time is on the X axis and timelines for discrete entities are stacked on the Y axis, with different states for the discrete entities rendered in different colors. Generating a statemap consists of two steps: *instrumentation* and *rendering*. The result is a SVG that can be visualized with a SVG viewer (e.g., a web browser), allowing *interaction*. ## Installation To compile the command to render a statemap from instrumentation data: cargo build --release Note that statemap requires Rust. ## Instrumentation Statemaps themselves are methodology- and OS-agnostic, but instrumentation is usually more system-specific. The `contrib` directory contains instrumentation for specific methodologies and systems that will generate data that can be used as input to the `statemap` command:
Name Method OS Statemap description
cpu-statemap.d DTrace SmartOS CPU activity by CPU
cpu-statemap-tagged.d DTrace SmartOS CPU activity by CPU, tagged by origin of activity
io-statemap.d DTrace SmartOS SCSI devices in terms of number of outstanding I/O operations
lx-cmd-statemap.d DTrace SmartOS Processes and threads of a specified command in an LX zone
lx-statemap.d DTrace SmartOS Threads in a specified process in an LX zone
postgres-statemap.d DTrace SmartOS PostgreSQL processes
postgres-zfs-statemap.d DTrace SmartOS PostgreSQL processes, with ZFS-specific states
spa-sync-statemap.d DTrace SmartOS ZFS SPA sync thread state
vdev-statemap.d DTrace SmartOS I/O activity by ZFS vdev
### Data format To generate data for statemap generation, instrumentation should create a file that consists of a stream of concatenated JSON. The expectation is that one JSON payload will consist of metadata, with many JSON payloads containing data, but the metadata may be split across multiple JSON payloads. (No field can appear more than once, however.) #### Metadata The following metadata fields are required: - `start`: A two-element array of integers consisting of the start time of the data in seconds (the 0th element) and nanoseconds within the second (the 1st element). The start time should be expressed in UTC. - `states`: An object in which each member is the name of a valid entity state. Each member object can contain the following : - `value`: The value by which this state will be referred to in the data stream. - `color`: The color that should be used to render the state. If the color is not specified, a color will be selected at random. For example, here is a valid `states` object: "states": { "on-cpu": {"value": 0, "color": "#DAF7A6" }, "off-cpu-waiting": {"value": 1, "color": "#f9f9f9" }, "off-cpu-futex": {"value": 2, "color": "#f0f0f0" }, "off-cpu-io": {"value": 3, "color": "#FFC300" }, "off-cpu-blocked": {"value": 4, "color": "#C70039" }, "off-cpu-dead": {"value": 5, "color": "#581845" } } In addition, the metadata can contain the following optional fields are optional: - `title`: The title of the statemap, such that it can meaningfully be in the clause "statemap of `title` activity." - `host`: The host on which the data was gathered. #### Data The data for a statemap is provided following the metadata as concatenated JSON (that is, each JSON payload is a datum). Each datum is a JSON object that must contain the following members: - `entity`: The name of the entity. - `time`: The time of the datum, expressed as a nanosecond offset from the `start` member present in the metadata. - `state`: The value of the state that begins at the time of the datum. Each datum may also contain an additional member: - `tag`: The tag for the state. See State tagging, below. #### State tagging It is often helpful to examine additional dimensionality within a particular state or states. For example, in understanding CPU activity, it may be helpful to understand not just that a CPU was in a state in which it was executing a user thread, but the nature of the thread itself: the thread identifier, process identifier, process name, and so on. To facilitate this, statemaps support *state tagging* whereby an immutable tag is associated with a particular transition to a particular state. There can be an arbitrary number of such tags, but the expectation is that there are many more state transitions than there are tags. Tags are indicated by the `tag` member of the state datum payload. Elsewhere in the stream of data (though not necessarily before the tag is used), the tag should be defined with a tag-defining JSON payload that contains the following two members: - `tag`: A string that is the tag that is being defined. - `state`: The state that corresponds to this tag. Each `state`/`tag` tuple must have its own tag definition. Beyond these two members, the tag definition can have any number of scalar members. Tags are immutable; if a tag is redefined, the last tag definition will apply to all uses of that tag. The tag should not contain member definitions that would cause it to be ambiguous with respect to data (namely, `entity` and `time` members). As an example, here is a tag definition for a state that is associated with interrupt activity that indicates the source device: ``` { "state": 6, "tag": "ffffd0c4f8f52000", "driver": "mpt_sas", "instance": 1 } ``` And here is an example of a tagged state datum: ``` { "time": "1579579142", "entity": "55", "state": 6, "tag": "ffffd0c4f8f52000" } ``` This would indicate that at time 1579579142, entity 55 went into state 6 -- and the tag for this state (in this case, the interrupting device) was instance 1 of the `mpt_sas` driver. ## Rendering To render a statemap, run the `statemap` command, providing an instrumentation data file. The resulting statemap will be written as a SVG on standard output: statemap my-instrumentation-output.out > statemap.svg Statemaps are interactive; the resulting SVG will contain controls that enable it to be zoomed, panned, states selected, etc. (See Interaction, below.) By default, statemaps consist of all states for the entire time duration represented in the input data. Because there can be many, many states represented in the input, states will (by default) be _coalesced_ when the time spent in a state is deemed a sufficiently small fraction of the overall time. For a coalesced state, the statemap will track the overall fraction of states present (and will use a color that represents a proportional blend of those states' colors). When a statemap contains coalesced states, some information will be lost (namely, the exact time delineations of state transitions within the coalesced state). Coalesced states can be eliminated in one of two ways: either the state coalescence target can be increased via the `-c` option, or the statemap can be regenerated to cover a smaller range of time with some combination of the `-b` option (to denote a beginning time) and the `-d` option (to denote a duration). The number of coalesced states can be determined by looking at the metadata placed at the end of of the output SVG. ### Options The `statemap` command has the following options: - `-b` (`--begin`): Takes a time offset at which the statemap should begin. The time offset may be expressed in floating point with an optional suffix (e.g., `-b 12.719s`). - `-c` (`--coalesce`): Specifies the coalescing factor. Higher numbers will result in less coalescence. - `-d` (`--duration`): Takes a duration time for the statemap. The time may be expressed in floating point with an optional suffix (e.g., `-d 491.2ms`). - `-h` (`--state-height`): The height (in pixels) of each state in the statemap. - `-i` (`--ignore-tags`): Ignore tags in the input, acting as if each state is untagged. (This will result in shorter run-time and a smaller resulting SVG.) - `-s` (`--sortby`): The state by which to sort (default is to sort by entity). - `-S` (`--stacksortby`): The state by which to sort statemaps, when multiple like statemaps are stacked (default is for the statemaps to be in the order specified). ## Interaction A statemap has icons for zooming and panning. As the statemap is zoomed, the time labels on top of the X axis will be updatd to reflect the current duration. Clicking on a statemap will highlight both the time at the point of the click as well as the state. Zooming when a time is selected will center the zoomed statemap at the specified time. To clear the time, click on the time label above the statemap; to select another time, simply click on the statemap. Shift-clicking (or Option-/Alt-clicking) on a statemap when a time is highlighted will highlight a dotted line at the time selected, as well as an indication of the time between the initial time highlighted and the time selected. This allows for the time delta between two events to be easily ascertained. ## Stacked statemaps To render a single SVG that contains multiple statemaps, multiple data files can be provided: statemap data-1.out data-2.out > statemap.svg The resulting statemaps will be stacked in the order of the data files as provided on the command line, with the first data file dictating the time bounds of the resulting stack. The statemaps can be similar statemaps from dissimilar entities (e.g., different machines), or they can be dissimilar statemaps (e.g., different statemaps), or any mix of these. Legends for similar statemaps will be shared. The `-S` option can control the sorting of stacked like statemaps. When statemaps are stacked, the coalescing factor applies to *each* statemap rather than to the entire stack of statemaps. When stacking many statemaps, low coalescing factors will be needed to prevent the resulting SVG from becoming excessively large. ================================================ FILE: contrib/cpu-statemap-tagged.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2018, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive #pragma D option switchrate=500hz #define STATE_UTHREAD 0 #define STATE_KTHREAD 1 #define STATE_INTR 1 #define STATE_IDLE 17 #define T_INTR 1 inline int STATE_MAX = 17; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"CPU\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"entityKind\": \"CPU\",\n"); printf("\t\"states\": {\n"); /* * Execution: shades of green */ STATE_METADATA(STATE_UTHREAD, "uthread", "#9BC362") STATE_METADATA(STATE_KTHREAD, "kthread", "#2E4E00") /* * Low level interrupts: shades of aqua and then blue */ STATE_METADATA(STATE_INTR + 1, "level-1", "#689D99") STATE_METADATA(STATE_INTR + 2, "level-2", "#41837E") STATE_METADATA(STATE_INTR + 3, "level-3", "#236863") STATE_METADATA(STATE_INTR + 4, "level-4", "#0D4E4A") STATE_METADATA(STATE_INTR + 5, "level-5", "#003430") STATE_METADATA(STATE_INTR + 6, "level-6", "#817FB2") STATE_METADATA(STATE_INTR + 7, "level-7", "#575594") STATE_METADATA(STATE_INTR + 8, "level-8", "#363377") STATE_METADATA(STATE_INTR + 9, "level-9", "#1C1A59") STATE_METADATA(STATE_INTR + 10, "level-10", "#0A093B") /* * High level interrupts: shades of red */ STATE_METADATA(STATE_INTR + 11, "level-11", "#FFAAAA") STATE_METADATA(STATE_INTR + 12, "level-12", "#D46A6A") STATE_METADATA(STATE_INTR + 13, "level-13", "#AA3939") STATE_METADATA(STATE_INTR + 14, "level-14", "#801515") STATE_METADATA(STATE_INTR + 15, "level-15", "#550000") STATE_METADATA(STATE_IDLE, "idle", "#e0e0e0") printf("\t}\n}\n"); start = timestamp; } interrupt-start /arg0 != NULL && !itagged[arg0]/ { itagged[arg0] = 1; this->pri = curthread->t_cpu->cpu_m.mcpu_pri; this->devi = (struct dev_info *)arg0; printf("{ \"state\": %d, \"tag\": \"%p\", ", this->pri + STATE_INTR, arg0); printf("\"driver\": \"%s\", \"instance\": %d }\n", stringof(`devnamesp[this->devi->devi_major].dn_name), this->devi->devi_instance); } interrupt-start /arg0 == NULL/ { this->pri = curthread->t_cpu->cpu_m.mcpu_pri; printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d }\n", timestamp - start, curthread->t_cpu->cpu_id, this->pri + STATE_INTR); } interrupt-start /arg0 != NULL/ { this->pri = curthread->t_cpu->cpu_m.mcpu_pri; printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d, \"tag\": \"%p\" }\n", timestamp - start, curthread->t_cpu->cpu_id, this->pri + STATE_INTR, arg0); /* * We set this, but we don't bother to ever clear it: the number of * CPUs and number of interrupt levels are both finite and small. */ itag[curthread->t_cpu, this->pri] = arg0; } av_dispatch_softvect:entry /!itagged[curthread->t_pil]/ { itagged[curthread->t_pil] = 1; printf("{ \"state\": %d, \"tag\": \"%p\", ", curthread->t_pil, curthread->t_pil + STATE_INTR); printf("\"driver\": \"softint\", \"instance\": 0 }\n"); } av_dispatch_softvect:entry { printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d, \"tag\": \"%p\" }\n", timestamp - start, curthread->t_cpu->cpu_id, curthread->t_pil + STATE_INTR, curthread->t_pil); itag[curthread->t_cpu, curthread->t_pil] = curthread->t_pil; } interrupt-complete, av_dispatch_softvect:return { this->intr = curthread->t_intr; this->pri = curthread->t_cpu->cpu_m.mcpu_pri; this->idle = 0; } interrupt-complete, av_dispatch_softvect:return /(this->pri > 10 && curthread == curthread->t_cpu->cpu_idle_thread) || (this->pri <= 10 && (this->intr == NULL || this->intr == curthread->t_cpu->cpu_idle_thread))/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d }\n", timestamp - start, curthread->t_cpu->cpu_id, STATE_IDLE); this->idle = 1; } interrupt-complete, av_dispatch_softvect:return /!this->idle/ { /* * We want to set the state (and tag) back to the thread that we're * going to return to, which we do imperfectly in that we don't * reflect high-level interrupts interrupting high-level interrupts * (we will show this as the underlying thread executing). */ printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d, \"tag\": \"%p\" }\n", timestamp - start, curthread->t_cpu->cpu_id, this->pri > 10 ? (curthread->t_pil > 0 ? curthread->t_pil + STATE_INTR : curthread->t_procp == &`p0 ? STATE_KTHREAD : STATE_UTHREAD) : (this->intr->t_pil > 0 ? this->intr->t_pil + STATE_INTR : this->intr->t_procp == &`p0 ? STATE_KTHREAD : STATE_UTHREAD), this->pri > 10 ? (curthread->t_pil > 0 ? itag[curthread->t_cpu, curthread->t_pil] : curthread->t_did) : (this->intr->t_pil > 0 ? itag[curthread->t_cpu, this->intr->t_pil] : this->intr->t_did)); } sched:::on-cpu /curthread != curthread->t_cpu->cpu_idle_thread && pid == 0 && !tagged[curthread->t_did]/ { tagged[curthread->t_did] = 1; printf("{ \"state\": %d, \"tag\": \"%p\", \"thread\": \"%a\", \"taskq\": \"%s\" }\n", STATE_KTHREAD, curthread->t_did, curthread->t_startpc, curthread->t_taskq != NULL ? stringof(((taskq_t *)curthread->t_taskq)->tq_name) : ""); } sched:::on-cpu /curthread != curthread->t_cpu->cpu_idle_thread && pid != 0 && !tagged[curthread->t_did]/ { tagged[curthread->t_did] = 1; /* * The godforsaken strtok() mess is to deal with pr_psargs that * contain an embedded quote, backslashing that quote to assure that * we generate valid JSON. Yes, it would be (MUCH!) easier if DTrace * provided a subroutine to do this, and this is imperfect in that (1) * it will eat backslashes and turn them into backslashed quotes, even * if that's not correct and (2) it will elide the string with an * ellipsis after the third quote or backslash -- but at least it will * always yield parseable JSON! */ printf("{ \"state\": %d, \"tag\": \"%p\", \"pid\": \"%d\", \"tid\": \"%d\", \"execname\": \"%s\", \"psargs\": \"%s\" }\n", STATE_UTHREAD, curthread->t_did, pid, tid, execname, strchr(curpsinfo->pr_psargs, '"') == NULL ? curpsinfo->pr_psargs : strjoin(strtok(curpsinfo->pr_psargs, "\"\\"), (this->s = strtok(NULL, "\"\\")) == NULL ? "" : strjoin(strjoin("\\\"", this->s), (this->s = strtok(NULL, "\"\\")) == NULL ? "" : strjoin(strjoin("\\\"", this->s), (this->s = strtok(NULL, "\"\\")) == NULL ? "" : strjoin(strjoin("\\\"", this->s), (this->s = strtok(NULL, "\"\\")) == NULL ? "" : strjoin("\\\"", this->s)))))); } sched:::on-cpu /curthread != curthread->t_cpu->cpu_idle_thread/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d, \"tag\": \"%p\" }\n", timestamp - start, curthread->t_cpu->cpu_id, (curthread->t_flag & T_INTR) ? curthread->t_pil + STATE_INTR : (curthread->t_procp == &`p0 ? STATE_KTHREAD : STATE_UTHREAD), (curthread->t_flag & T_INTR) ? itag[curthread->t_cpu, curthread->t_pil] : curthread->t_did); } sched:::on-cpu /curthread == curthread->t_cpu->cpu_idle_thread/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d }\n", timestamp - start, curthread->t_cpu->cpu_id, STATE_IDLE); } tick-1sec /timestamp - start > 10 * 1000000000/ { exit(0); } ================================================ FILE: contrib/cpu-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2018, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive #pragma D option switchrate=100hz #define STATE_IDLE 0 #define STATE_UTHREAD 16 #define STATE_KTHREAD 17 #define T_INTR 1 inline int STATE_MAX = 17; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"CPU\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"states\": {\n"); STATE_METADATA(STATE_IDLE, "idle", "#e0e0e0") /* * Low level interrupts: shades of aqua and then blue */ STATE_METADATA(1, "level-1", "#689D99") STATE_METADATA(2, "level-2", "#41837E") STATE_METADATA(3, "level-3", "#236863") STATE_METADATA(4, "level-4", "#0D4E4A") STATE_METADATA(5, "level-5", "#003430") STATE_METADATA(6, "level-6", "#817FB2") STATE_METADATA(7, "level-7", "#575594") STATE_METADATA(8, "level-8", "#363377") STATE_METADATA(9, "level-9", "#1C1A59") STATE_METADATA(10, "level-10", "#0A093B") /* * High level interrupts: shades of red */ STATE_METADATA(11, "level-11", "#FFAAAA") STATE_METADATA(12, "level-12", "#D46A6A") STATE_METADATA(13, "level-13", "#AA3939") STATE_METADATA(14, "level-14", "#801515") STATE_METADATA(15, "level-15", "#550000") /* * Execution: shades of green */ STATE_METADATA(STATE_UTHREAD, "uthread", "#9BC362") STATE_METADATA(STATE_KTHREAD, "kthread", "#2E4E00") printf("\t}\n}\n"); start = timestamp; } interrupt-start { this->pri = curthread->t_cpu->cpu_m.mcpu_pri; printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d }\n", timestamp - start, curthread->t_cpu->cpu_id, this->pri); } interrupt-complete { this->intr = curthread->t_intr; this->pri = curthread->t_cpu->cpu_m.mcpu_pri; /* * This is a bit gnarly: we need to set the state to be back to * what it was before the interrupt took place. This is slightly * imperfect in that it doesn't quite reflect high-level interrupts * interrupting high-level interrupts, but that should be an unusual * enough condition that this should be good enough for most purposes. */ printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d }\n", timestamp - start, curthread->t_cpu->cpu_id, this->pri > 10 ? (curthread == curthread->t_cpu->cpu_idle_thread ? STATE_IDLE : curthread->t_pil > 0 ? curthread->t_pil : curthread->t_procp == &`p0 ? STATE_KTHREAD : STATE_UTHREAD) : this->intr != NULL ? (this->intr == curthread->t_cpu->cpu_idle_thread ? STATE_IDLE : this->intr->t_pil > 0 ? this->intr->t_pil : this->intr->t_procp == &`p0 ? STATE_KTHREAD : STATE_UTHREAD) : STATE_IDLE); } sched:::on-cpu { printf("{ \"time\": \"%d\", \"entity\": \"%d\", \"state\": %d }\n", timestamp - start, curthread->t_cpu->cpu_id, curthread == curthread->t_cpu->cpu_idle_thread ? STATE_IDLE : (curthread->t_flag & T_INTR) ? curthread->t_pil : curthread->t_procp == &`p0 ? STATE_KTHREAD : STATE_UTHREAD); } tick-1sec /timestamp - start > 10 * 1000000000/ { exit(0); } ================================================ FILE: contrib/io-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2018, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive inline int STATE_MAXIO = 20; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAXIO ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"disk I/O\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"states\": {\n"); STATE_METADATA(0, "no I/O", "#e0e0e0") STATE_METADATA(1, "1 I/O", "#DFE500"); STATE_METADATA(2, "2 I/Os", "#DDD800"); STATE_METADATA(3, "3 I/Os", "#DBCC01"); STATE_METADATA(4, "4 I/Os", "#D9C002"); STATE_METADATA(5, "5 I/Os", "#D8B403"); STATE_METADATA(6, "6 I/Os", "#D6A804"); STATE_METADATA(7, "7 I/Os", "#D49C05"); STATE_METADATA(8, "8 I/Os", "#D39006"); STATE_METADATA(9, "9 I/Os", "#D18407"); STATE_METADATA(10, "10 I/Os", "#CF7808"); STATE_METADATA(11, "11 I/Os", "#CE6C09"); STATE_METADATA(12, "12 I/Os", "#CC600A"); STATE_METADATA(13, "13 I/Os", "#CA540B"); STATE_METADATA(14, "14 I/Os", "#C9480C"); STATE_METADATA(15, "15 I/Os", "#C73C0D"); STATE_METADATA(16, "16 I/Os", "#C5300E"); STATE_METADATA(17, "17 I/Os", "#C4240F"); STATE_METADATA(18, "18 I/Os", "#C21810"); STATE_METADATA(19, "19 I/Os", "#C00C11"); STATE_METADATA(STATE_MAXIO, ">=20 I/Os", "#BF0012"); printf("\t}\n}\n"); start = timestamp; } scsi-transport-dispatch { this->b = (struct buf *)arg0; this->u = ((struct sd_xbuf *)this->b->b_private)->xb_un; printf("{ \"time\": \"%d\", \"entity\": \"sd%d\", \"state\": %d }\n", timestamp - start, ((struct dev_info *)this->u->un_sd->sd_dev)->devi_instance, this->u->un_ncmds_in_transport < STATE_MAXIO ? this->u->un_ncmds_in_transport : STATE_MAXIO); } sdintr:entry { this->b = (struct buf *)args[0]->pkt_private; self->un = ((struct sd_xbuf *)this->b->b_private)->xb_un; } sdintr:return /(this->u = self->un) != NULL/ { printf("{ \"time\": \"%d\", \"entity\": \"sd%d\", \"state\": %d }\n", timestamp - start, ((struct dev_info *)this->u->un_sd->sd_dev)->devi_instance, this->u->un_ncmds_in_transport < STATE_MAXIO ? this->u->un_ncmds_in_transport : STATE_MAXIO); self->un = NULL; } tick-1sec /timestamp - start > 10 * 1000000000/ { exit(0); } ================================================ FILE: contrib/lx-cmd-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2017, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive #define T_WAKEABLE 0x0002 typedef enum { STATE_ON_CPU = 0, STATE_OFF_CPU_WAITING = 1, STATE_OFF_CPU_FUTEX = 2, STATE_OFF_CPU_IO = 3, STATE_OFF_CPU_BLOCKED = 4, STATE_OFF_CPU_DEAD = 5, STATE_MAX = 6 } state_t; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX - 1 ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"all %s LX processes\",\n", $$1); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"states\": {\n"); STATE_METADATA(STATE_ON_CPU, "on-cpu", "#DAF7A6") STATE_METADATA(STATE_OFF_CPU_WAITING, "off-cpu-waiting", "#f9f9f9") STATE_METADATA(STATE_OFF_CPU_FUTEX, "off-cpu-futex", "#f0f0f0") STATE_METADATA(STATE_OFF_CPU_IO, "off-cpu-io", "#FFC300") STATE_METADATA(STATE_OFF_CPU_BLOCKED, "off-cpu-blocked", "#C70039") STATE_METADATA(STATE_OFF_CPU_DEAD, "off-cpu-dead", "#581845") printf("\t}\n}\n"); start = timestamp; } zfs_fillpage:entry /execname == $$1/ { self->state = STATE_OFF_CPU_IO; } zfs_fillpage:return /execname == $$1/ { self->state = STATE_ON_CPU; } lx_futex:entry /execname == $$1/ { self->state = STATE_OFF_CPU_FUTEX; } lx_futex:return /execname == $$1/ { self->state = STATE_ON_CPU; } sched:::off-cpu /execname == $$1/ { printf("{ \"time\": \"%d\", \"entity\": \"%d/%d\", ", timestamp - start, pid, tid); printf("\"state\": %d }\n", self->state != STATE_ON_CPU ? self->state : curthread->t_flag & T_WAKEABLE ? STATE_OFF_CPU_WAITING : STATE_OFF_CPU_BLOCKED); } sched:::on-cpu /execname == $$1/ { self->state = STATE_ON_CPU; printf("{ \"time\": \"%d\", \"entity\": \"%d/%d\", ", timestamp - start, pid, tid); printf("\"state\": %d }\n", self->state); } proc:::lwp-exit /execname == $$1/ { printf("{ \"time\": \"%d\", \"entity\": \"%d/%d\", ", timestamp - start, pid, tid); printf("\"state\": %d }\n", STATE_OFF_CPU_DEAD); } tick-1sec /timestamp - start > 60 * 1000000000/ { exit(0); } ================================================ FILE: contrib/lx-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2017, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive #define T_WAKEABLE 0x0002 typedef enum { STATE_ON_CPU = 0, STATE_OFF_CPU_WAITING = 1, STATE_OFF_CPU_FUTEX = 2, STATE_OFF_CPU_IO = 3, STATE_OFF_CPU_BLOCKED = 4, STATE_OFF_CPU_DEAD = 5, STATE_MAX = 6 } state_t; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX - 1 ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"LX process ID %s\",\n", $$1); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"states\": {\n"); STATE_METADATA(STATE_ON_CPU, "on-cpu", "#DAF7A6") STATE_METADATA(STATE_OFF_CPU_WAITING, "off-cpu-waiting", "#f9f9f9") STATE_METADATA(STATE_OFF_CPU_FUTEX, "off-cpu-futex", "#f0f0f0") STATE_METADATA(STATE_OFF_CPU_IO, "off-cpu-io", "#FFC300") STATE_METADATA(STATE_OFF_CPU_BLOCKED, "off-cpu-blocked", "#C70039") STATE_METADATA(STATE_OFF_CPU_DEAD, "off-cpu-dead", "#581845") printf("\t}\n}\n"); start = timestamp; } sched:::wakeup /pid == $1 && args[1]->pr_pid == $1/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, tid); printf("\"event\": \"wakeup\", \"target\": \"%d\" }\n", args[0]->pr_lwpid); } zfs_fillpage:entry /pid == $1/ { self->state = STATE_OFF_CPU_IO; } zfs_fillpage:return /pid == $1/ { self->state = STATE_ON_CPU; } lx_futex:entry /pid == $1/ { self->state = STATE_OFF_CPU_FUTEX; } lx_futex:return /pid == $1/ { self->state = STATE_ON_CPU; } sched:::off-cpu /pid == $1/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, tid); printf("\"state\": %d }\n", self->state != STATE_ON_CPU ? self->state : curthread->t_flag & T_WAKEABLE ? STATE_OFF_CPU_WAITING : STATE_OFF_CPU_BLOCKED); } sched:::on-cpu /pid == $1/ { self->state = STATE_ON_CPU; printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, tid); printf("\"state\": %d }\n", self->state); } proc:::lwp-exit /pid == $1/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, tid); printf("\"state\": %d }\n", STATE_OFF_CPU_DEAD); } tick-1sec /timestamp - start > 60 * 1000000000/ { exit(0); } ================================================ FILE: contrib/postgres-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2017, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive #define T_WAKEABLE 0x0002 typedef enum { STATE_ON_CPU = 0, STATE_OFF_CPU_WAITING, STATE_OFF_CPU_SEMOP, STATE_OFF_CPU_BLOCKED, STATE_OFF_CPU_IO_READ, STATE_OFF_CPU_IO_WRITE, STATE_OFF_CPU_DEAD, STATE_MAX } state_t; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX - 1 ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"PostgreSQL\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"entityKind\": \"Process\",\n"); printf("\t\"states\": {\n"); STATE_METADATA(STATE_ON_CPU, "on-cpu", "#DAF7A6") STATE_METADATA(STATE_OFF_CPU_WAITING, "off-cpu-waiting", "#f9f9f9") STATE_METADATA(STATE_OFF_CPU_SEMOP, "off-cpu-semop", "#FF5733") STATE_METADATA(STATE_OFF_CPU_BLOCKED, "off-cpu-blocked", "#C70039") STATE_METADATA(STATE_OFF_CPU_IO_READ, "off-cpu-io-read", "#FFC300") STATE_METADATA(STATE_OFF_CPU_IO_WRITE, "off-cpu-io-write", "#338AFF") STATE_METADATA(STATE_OFF_CPU_DEAD, "off-cpu-dead", "#E0E0E0") printf("\t}\n}\n"); start = timestamp; } sched:::wakeup /execname == "postgres" && args[1]->pr_fname == "postgres"/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, pid); printf("\"event\": \"wakeup\", \"target\": \"%d\" }\n", args[1]->pr_pid); } syscall::read:entry /execname == "postgres"/ { self->state = STATE_OFF_CPU_IO_READ; } syscall::write:entry /execname == "postgres"/ { self->state = STATE_OFF_CPU_IO_WRITE; } syscall::read:return, syscall::write:return /execname == "postgres"/ { self->state = STATE_ON_CPU; } fbt::semop:entry /execname == "postgres"/ { self->state = STATE_OFF_CPU_SEMOP; } fbt::semop:return /execname == "postgres"/ { self->state = STATE_ON_CPU; } sched:::off-cpu /execname == "postgres"/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, pid); printf("\"state\": %d }\n", self->state != STATE_ON_CPU ? self->state : curthread->t_flag & T_WAKEABLE ? STATE_OFF_CPU_WAITING : STATE_OFF_CPU_BLOCKED); } sched:::on-cpu /execname == "postgres"/ { self->state = STATE_ON_CPU; printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, pid); printf("\"state\": %d }\n", self->state); } proc:::exit /execname == "postgres"/ { self->exiting = pid; } sched:::off-cpu /execname != "postgres" && self->exiting/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, self->exiting); printf("\"state\": %d }\n", STATE_OFF_CPU_DEAD); self->exiting = 0; self->state = 0; } /* * This is -- to put it mildly -- very specific to the implementation of * PostgreSQL: if the process is long-running, it lifts argv[0] out of the * address space, and -- iff it matches the form "postgres: [description] * process", sets the description for the process to be [description]. */ sched:::on-cpu /execname == "postgres" && timestamp - curthread->t_procp->p_mstart > 1000000000 && !seen[pid]/ { seen[pid] = 1; this->arg = *(uintptr_t *)copyin(curthread->t_procp->p_user.u_argv, 8); this->index = index(this->process = copyinstr(this->arg), " process"); if (this->index > 0 && index(this->process, "postgres: ") == 0) { printf("{ \"entity\": \"%d\", \"description\": \"%s\" }\n", pid, substr(this->process, 10, this->index - 10)); } } tick-1sec /timestamp - start > 60 * 1000000000/ { exit(0); } ================================================ FILE: contrib/postgres-zfs-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2018, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive #define T_WAKEABLE 0x0002 typedef enum { STATE_ON_CPU = 0, STATE_OFF_CPU_WAITING, STATE_OFF_CPU_SEMOP, STATE_OFF_CPU_BLOCKED, STATE_OFF_CPU_ZFS_READ, STATE_OFF_CPU_ZFS_WRITE, STATE_OFF_CPU_ZIL_COMMIT, STATE_OFF_CPU_TX_DELAY, STATE_OFF_CPU_DEAD, STATE_MAX } state_t; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX - 1 ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"PostgreSQL\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"entityKind\": \"Process\",\n"); printf("\t\"states\": {\n"); STATE_METADATA(STATE_ON_CPU, "on-cpu", "#DAF7A6") STATE_METADATA(STATE_OFF_CPU_WAITING, "off-cpu-waiting", "#f9f9f9") STATE_METADATA(STATE_OFF_CPU_SEMOP, "off-cpu-semop", "#FF5733") STATE_METADATA(STATE_OFF_CPU_BLOCKED, "off-cpu-blocked", "#C70039") STATE_METADATA(STATE_OFF_CPU_ZFS_READ, "off-cpu-zfs-read", "#FFC300") STATE_METADATA(STATE_OFF_CPU_ZFS_WRITE, "off-cpu-zfs-write", "#338AFF") STATE_METADATA(STATE_OFF_CPU_ZIL_COMMIT, "off-cpu-zil-commit", "#66FFCC") STATE_METADATA(STATE_OFF_CPU_TX_DELAY, "off-cpu-tx-delay", "#CCFF00") STATE_METADATA(STATE_OFF_CPU_DEAD, "off-cpu-dead", "#E0E0E0") printf("\t}\n}\n"); start = timestamp; } sched:::wakeup /execname == "postgres" && args[1]->pr_fname == "postgres"/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, pid); printf("\"event\": \"wakeup\", \"target\": \"%d\" }\n", args[1]->pr_pid); } fbt::zfs_read:entry /execname == "postgres"/ { self->state = STATE_OFF_CPU_ZFS_READ; } fbt::zfs_write:entry /execname == "postgres"/ { self->state = STATE_OFF_CPU_ZFS_WRITE; } syscall:::return /execname == "postgres"/ { self->state = STATE_ON_CPU; } fbt::semop:entry /execname == "postgres"/ { self->state = STATE_OFF_CPU_SEMOP; } fbt::semop:return /execname == "postgres"/ { self->state = STATE_ON_CPU; } fbt::zil_commit:entry /self->state == STATE_OFF_CPU_ZFS_WRITE/ { self->state = STATE_OFF_CPU_ZIL_COMMIT; } fbt::zil_commit:return /self->state == STATE_OFF_CPU_ZIL_COMMIT/ { self->state = STATE_OFF_CPU_ZFS_WRITE; } fbt::dmu_tx_delay:entry /self->state == STATE_OFF_CPU_ZFS_WRITE/ { self->state = STATE_OFF_CPU_TX_DELAY; } fbt::dmu_tx_delay:return /self->state == STATE_OFF_CPU_TX_DELAY/ { self->state = STATE_OFF_CPU_ZFS_WRITE; } sched:::off-cpu /execname == "postgres"/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, pid); printf("\"state\": %d }\n", self->state != STATE_ON_CPU ? self->state : (curthread->t_flag & T_WAKEABLE ? STATE_OFF_CPU_WAITING : STATE_OFF_CPU_BLOCKED)); } sched:::on-cpu /execname == "postgres"/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, pid); printf("\"state\": %d }\n", STATE_ON_CPU); } proc:::exit /execname == "postgres"/ { self->exiting = pid; } sched:::off-cpu /execname != "postgres" && self->exiting/ { printf("{ \"time\": \"%d\", \"entity\": \"%d\", ", timestamp - start, self->exiting); printf("\"state\": %d }\n", STATE_OFF_CPU_DEAD); self->exiting = 0; self->state = 0; } /* * This is -- to put it mildly -- very specific to the implementation of * PostgreSQL: if the process is long-running, it lifts argv[0] out of the * address space, and -- iff it matches the form "postgres: [description] * process", sets the description for the process to be [description]. */ sched:::on-cpu /execname == "postgres" && timestamp - curthread->t_procp->p_mstart > 1000000000 && !seen[pid]/ { seen[pid] = 1; this->arg = *(uintptr_t *)copyin(curthread->t_procp->p_user.u_argv, 8); this->index = index(this->process = copyinstr(this->arg), " process"); if (this->index > 0 && index(this->process, "postgres: ") == 0) { printf("{ \"entity\": \"%d\", \"description\": \"%s\" }\n", pid, substr(this->process, 10, this->index - 10)); } } tick-1sec /timestamp - start > 120 * 1000000000/ { exit(0); } ================================================ FILE: contrib/spa-sync-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2018, Joyent, Inc. */ #pragma D option quiet typedef enum { STATE_ON_CPU = 0, STATE_OFF_CPU_WAITING, STATE_OFF_CPU_BLOCKED, STATE_OFF_CPU_ZIO_WAIT, STATE_OFF_CPU_ZIO_WAIT_MOS, STATE_OFF_CPU_ZIO_WAIT_SYNC, STATE_OFF_CPU_OBJSET_SYNC, STATE_OFF_CPU_CV, STATE_OFF_CPU_PREEMPTED, STATE_MAX } state_t; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX - 1 ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"SPA sync\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"entityKind\": \"SPA sync thread for pool\",\n"); printf("\t\"states\": {\n"); STATE_METADATA(STATE_ON_CPU, "on-cpu", "#DAF7A6") STATE_METADATA(STATE_OFF_CPU_WAITING, "off-cpu-waiting", "#f9f9f9") STATE_METADATA(STATE_OFF_CPU_BLOCKED, "off-cpu-blocked", "#C70039") STATE_METADATA(STATE_OFF_CPU_ZIO_WAIT, "off-cpu-zio-wait", "#FFC300") STATE_METADATA(STATE_OFF_CPU_ZIO_WAIT_MOS, "off-cpu-zio-wait-mos", "#FF5733") STATE_METADATA(STATE_OFF_CPU_ZIO_WAIT_SYNC, "off-cpu-zio-wait-sync", "#BB8FCE") STATE_METADATA(STATE_OFF_CPU_OBJSET_SYNC, "off-cpu-objset-sync", "#338AFF") STATE_METADATA(STATE_OFF_CPU_CV, "off-cpu-cv", "#66FFCC") STATE_METADATA(STATE_OFF_CPU_PREEMPTED, "off-cpu-preempted", "#CCFF00") printf("\t}\n}\n"); start = timestamp; } fbt::spa_sync:return { self->state = STATE_OFF_CPU_WAITING; } fbt::spa_sync:entry { self->spa = args[0]; self->state = STATE_ON_CPU; } fbt::zio_wait:entry /self->spa != NULL && self->state == STATE_ON_CPU/ { self->state = STATE_OFF_CPU_ZIO_WAIT; } fbt::zio_wait:return /self->state == STATE_OFF_CPU_ZIO_WAIT/ { self->state = STATE_ON_CPU; } fbt::vdev_config_sync:entry /self->state == STATE_ON_CPU/ { self->state = STATE_OFF_CPU_ZIO_WAIT_SYNC; } fbt::vdev_config_sync:return /self->state == STATE_OFF_CPU_ZIO_WAIT_SYNC/ { self->state = STATE_ON_CPU; } fbt::dsl_pool_sync_mos:entry /self->state == STATE_ON_CPU/ { self->state = STATE_OFF_CPU_ZIO_WAIT_MOS; } fbt::dsl_pool_sync_mos:return /self->state == STATE_OFF_CPU_ZIO_WAIT_MOS/ { self->state = STATE_ON_CPU; } fbt::dmu_objset_sync:entry /self->state == STATE_ON_CPU/ { self->state = STATE_OFF_CPU_OBJSET_SYNC; } fbt::dmu_objset_sync:return /self->state == STATE_OFF_CPU_OBJSET_SYNC/ { self->state = STATE_ON_CPU; } sched:::off-cpu /self->spa != NULL/ { printf("{ \"time\": \"%d\", \"entity\": \"%s\", ", timestamp - start, self->spa->spa_name); printf("\"state\": %d }\n", self->state != STATE_ON_CPU ? self->state : curthread->t_sobj_ops == NULL ? STATE_OFF_CPU_PREEMPTED : curthread->t_sobj_ops == &`cv_sobj_ops ? STATE_OFF_CPU_CV : STATE_OFF_CPU_BLOCKED); } sched:::on-cpu /self->spa != NULL/ { printf("{ \"time\": \"%d\", \"entity\": \"%s\", ", timestamp - start, self->spa->spa_name); printf("\"state\": %d }\n", STATE_ON_CPU); } tick-1sec /timestamp - start > 300 * 1000000000/ { exit(0); } ================================================ FILE: contrib/vdev-statemap.d ================================================ #!/usr/sbin/dtrace -Cs /* * Copyright 2018, Joyent, Inc. */ #pragma D option quiet #pragma D option destructive typedef enum zio_priority { ZIO_PRIORITY_SYNC_READ, ZIO_PRIORITY_SYNC_WRITE, /* ZIL */ ZIO_PRIORITY_ASYNC_READ, /* prefetch */ ZIO_PRIORITY_ASYNC_WRITE, /* spa_sync() */ ZIO_PRIORITY_SCRUB, /* asynchronous scrub/resilver reads */ ZIO_PRIORITY_REMOVAL, /* reads/writes for vdev removal */ ZIO_PRIORITY_INITIALIZING, /* initializing I/O */ ZIO_PRIORITY_NUM_QUEUEABLE } zio_priority_t; typedef enum { STATE_NONE = 0, STATE_READ, STATE_WRITE, STATE_RW, STATE_MAX } state_t; state_t state[vdev_queue_t *]; #define STATE_METADATA(_state, _str, _color) \ printf("\t\t\"%s\": {\"value\": %d, \"color\": \"%s\" }%s\n", \ _str, _state, _color, _state < STATE_MAX - 1 ? "," : ""); BEGIN { wall = walltimestamp; printf("{\n\t\"start\": [ %d, %d ],\n", wall / 1000000000, wall % 1000000000); printf("\t\"title\": \"vdev I/O\",\n"); printf("\t\"host\": \"%s\",\n", `utsname.nodename); printf("\t\"states\": {\n"); STATE_METADATA(STATE_NONE, "idle", "#e0e0e0"); STATE_METADATA(STATE_READ, "reading", "#FFC300"); STATE_METADATA(STATE_WRITE, "writing", "#FF5733"); STATE_METADATA(STATE_RW, "reading+writing", "#C70039"); printf("\t}\n}\n"); start = timestamp; } vdev_queue_pending_add:entry { this->prio = (args[1]->io_priority == ZIO_PRIORITY_SYNC_WRITE || args[1]->io_priority == ZIO_PRIORITY_ASYNC_WRITE) ? STATE_WRITE : STATE_READ; this->state = state[args[0]]; this->next = this->state != STATE_NONE ? this->state : this->prio; } vdev_queue_pending_add:entry /(this->state == STATE_READ && this->prio == STATE_WRITE) || (this->state == STATE_WRITE && this->prio == STATE_READ)/ { this->next = STATE_RW; } vdev_queue_pending_remove:entry { this->prio = (args[1]->io_priority == ZIO_PRIORITY_SYNC_WRITE || args[1]->io_priority == ZIO_PRIORITY_ASYNC_WRITE) ? STATE_WRITE : STATE_READ; this->reads = args[0]->vq_class[ZIO_PRIORITY_ASYNC_READ].vqc_active + args[0]->vq_class[ZIO_PRIORITY_SYNC_READ].vqc_active - (this->prio == STATE_READ ? 1 : 0); this->writes = args[0]->vq_class[ZIO_PRIORITY_ASYNC_WRITE].vqc_active + args[0]->vq_class[ZIO_PRIORITY_SYNC_WRITE].vqc_active - (this->prio == STATE_WRITE ? 1 : 0); this->state = state[args[0]]; this->next = this->reads > 0 ? (this->writes > 0 ? STATE_RW : STATE_READ) : (this->writes > 0 ? STATE_WRITE : STATE_NONE); } vdev_queue_pending_add:entry, vdev_queue_pending_remove:entry /this->state != this->next/ { this->q = (vdev_queue_t *)arg0; printf("{ \"time\": \"%d\", \"entity\": \"%s\", \"state\": %d }\n", timestamp - start, basename(this->q->vq_vdev->vdev_path), this->next); state[this->q] = this->next; } tick-1sec /timestamp - start > 300 * 1000000000/ { exit(0); } ================================================ FILE: src/icons/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: src/icons/README.md ================================================ # Statemap icons The icons here are from the [svg-icon](https://leungwensen.github.io/svg-icon/) project, and in particular the ["zero" family](https://leungwensen.github.io/svg-icon/#zero). ================================================ FILE: src/main.rs ================================================ /* * Copyright 2018 Joyent, Inc. */ /* * We don't want to get away with not using values that we must use. */ #![deny(unused_must_use)] extern crate getopts; use getopts::Options; use getopts::HasArg; use std::env; #[macro_use] extern crate serde_derive; #[macro_use] extern crate serde_json; mod statemap; use statemap::*; macro_rules! fatal { ($fmt:expr) => ({ eprint!(concat!("statemap: ", $fmt, "\n")); ::std::process::exit(1); }); ($fmt:expr, $($arg:tt)*) => ({ eprint!(concat!("statemap: ", $fmt, "\n"), $($arg)*); ::std::process::exit(1); }); } fn usage(opts: Options) { println!("{}", opts.usage("Usage: statemap [options] FILE")); ::std::process::exit(0); } fn parse_offset(matches: &getopts::Matches, opt: &str) -> i64 { fn parse_offset_val(val: &str) -> Option { let mut mult: i64 = 1; let mut num = val; let suffixes: &[(&'static str, i64)] = &[ ("ns", 1), ("us", 1_000), ("ms", 1_000_000), ("s", 1_000_000_000), ("sec", 1_000_000_000) ]; for suffix in suffixes { if val.ends_with(suffix.0) { mult = suffix.1; num = &val[..val.len() - suffix.0.len()]; break; } } /* * First attempt to parse our number as an integer, falling back * on parsing it as floating point if that fails (and being sure * to not allow some joker to specify "NaNms"). */ match num.parse::() { Err(_err) => { match num.parse::() { Err(_err) => None, Ok(val) => { if val.is_nan() { None } else { Some((val * mult as f64) as i64) } } } }, Ok(val) => Some(val * mult) } } /* * We can safely unwrap here because we should only be here if the option * has been set. */ let optval = matches.opt_str(opt).unwrap(); match parse_offset_val(&optval) { Some(val) => val, None => fatal!(concat!("value for {} is not a valid ", "expression of time: \"{}\""), opt, optval) } } fn main() { struct Opt { name: (&'static str, &'static str), help: &'static str, hint: &'static str, hasarg: HasArg, alias: Option<&'static str>, } let opts: &[Opt] = &[ Opt { name: ("b", "begin"), help: "time offset at which to begin statemap", hint: "TIME", hasarg: HasArg::Yes, alias: None, }, Opt { name: ("e", "end"), help: "time offset at which to end statemap", hint: "TIME", hasarg: HasArg::Yes, alias: None, }, Opt { name: ("d", "duration"), help: "time duration of statemap", hint: "TIME", hasarg: HasArg::Yes, alias: None, }, Opt { name: ("c", "coalesce"), help: "coalesce target", hint: "TARGET", hasarg: HasArg::Yes, alias: None, }, Opt { name: ("?", "help"), help: "print this usage message", hint: "", hasarg: HasArg::No, alias: None, }, Opt { name: ("s", "sortby"), help: "state to sort by (defaults to entity name)", hint: "STATE", hasarg: HasArg::Yes, alias: None, }, Opt { name: ("S", "stacksortby"), help: "state to sort stacked statemaps by", hint: "STATE", hasarg: HasArg::Yes, alias: None, }, Opt { name: ("i", "ignore-tags"), help: "ignore tags in input", hint: "", hasarg: HasArg::No, alias: Some("ignoreTags"), }, Opt { name: ("h", "state-height"), help: "height of each state, in pixels", hint: "PIXELS", hasarg: HasArg::Yes, alias: Some("stateHeight"), }, Opt { name: ("n", "dry-run"), help: "ingest data, but do not generate output", hint: "", hasarg: HasArg::No, alias: None, }, ]; let mut args: Vec = env::args().collect(); /* * Iterate over our arguments and options, replacing any alias we find. * This allows us to (silently -- and inelegantly) remain backward * compatible with camel-cased options while moving to snake-cased ones. */ for i in 0..args.len() { for opt in opts { if let Some(alias) = opt.alias { if args[i].find(alias) != None { args[i] = args[i].replace(alias, opt.name.1); } } } } let mut parser = Options::new(); /* * Load the parser with our options. */ for opt in opts { parser.opt(opt.name.0, opt.name.1, opt.help, opt.hint, opt.hasarg, getopts::Occur::Optional); } let matches = match parser.parse(&args[1..]) { Ok(m) => { m } Err(f) => { fatal!("{}", f) } }; if matches.opt_present("help") { usage(parser); } let mut begin: i64 = 0; let mut end: i64 = 0; let has_duration = matches.opt_present("duration"); let has_begin = matches.opt_present("begin"); let has_end = matches.opt_present("end"); if has_duration { let duration = parse_offset(&matches, "duration"); if has_begin { if has_end { fatal!("cannot specify all of begin, end, and duration"); } else { begin = parse_offset(&matches, "begin"); end = begin + duration; } } else { if has_end { end = parse_offset(&matches, "end"); if duration > end { fatal!("duration cannot exceed end offset"); } begin = end - duration; } else { end = duration; } } } else { if has_end { end = parse_offset(&matches, "end") } if has_begin { begin = parse_offset(&matches, "begin"); if end < begin { fatal!("begin offset must be less than end offset"); } } } if matches.free.is_empty() { fatal!("must specify a data file"); } let mut config = Config { begin: begin, end: end, notags: matches.opt_present("ignore-tags"), abstime: false, .. Default::default() }; match matches.opt_str("coalesce") { Some(str) => match str.parse::() { Err(_err) => fatal!("coalesce factor must be an integer"), Ok(val) => config.maxrect = val } _ => {} } let mut svgconf: StatemapSVGConfig = Default::default(); svgconf.sortby = matches.opt_str("sortby"); svgconf.stacksortby = matches.opt_str("stacksortby"); if let Some(str) = matches.opt_str("state-height") { match str.parse::() { Err(_err) => fatal!("state height must be an integer"), Ok(val) => svgconf.stripHeight = val } } let mut statemaps: Vec = vec![]; for i in 0..matches.free.len() { let mut statemap = Statemap::new(&config); let filename = &matches.free[i]; match statemap.ingest(filename) { Err(f) => { fatal!("could not ingest {}: {}", filename, f); } Ok(k) => { k } } if !config.abstime { /* * If our time configuration is not absolute, we just processed * our first statemap; change our time configuration to now be * absolute to key the time for every subsequent statemap based * on this first statemap. */ assert!(i == 0); config.abstime = true; let timebounds = statemap.timebounds(); config.begin = timebounds.0 as i64; config.end = timebounds.1 as i64; } statemaps.push(statemap); } if matches.opt_present("dry-run") { return; } let svg = StatemapSVG::new(&svgconf); match svg.output(&statemaps) { Err(f) => { fatal!("{}", f); } Ok(k) => { k } } } ================================================ FILE: src/statemap-svg.css ================================================ /* * Copyright 2018, Joyent, Inc. */ .sansserif { font-family: Verdana, Arial, Helvetica, sans-serif; } .button { fill: #fff; } .statemap-border { fill: none; stroke: black; stroke-width: 0.5; } .statemap-highlight { fill: blue; } .statemap-title { font-size: 10pt; font-weight: bold; text-anchor: middle; cursor: default; } .statemap-timelabel { font-size: 8pt; text-anchor: middle; cursor: default; } .statemap-timebar { stroke: blue; fill: blue; stroke-width: 1px; } .statemap-timetext { font-size: 8pt; font-weight: normal; fill: blue; stroke: blue; stroke-width: 0px; cursor: default; } .statemap-timebreaktext { font-size: 8pt; font-weight: bold; fill: blue; stroke: white; stroke-width: 0.3px; cursor: default; } .statemap-subbar { stroke: blue; fill: blue; stroke-width: 1px; stroke-dasharray: 5.7; } .statemap-subbar-span { stroke: blue; fill: blue; stroke-width: 0.75px; stroke-dasharray: 1; } .statemap-subbar-text { font-size: 8pt; font-weight: bold; fill: blue; stroke: white; stroke-width: 0.3px; cursor: default; } .statemap-statebar { stroke: blue; fill: blue; stroke-width: 1px; } .statemap-statetext { font-size: 8pt; font-weight: normal; fill: blue; stroke: blue; stroke-width: 0px; cursor: default; } .statemap-timeline { stroke: black; stroke-width: 0.5pt; marker-start: url(#startarrow); marker-end: url(#endarrow); } .statemap-legend { stroke: black; stroke-width: 0.5pt; } .statemap-legend-highlighted { stroke: blue; stroke-width: 3pt; } .statemap-legendlabel { font-size: 7pt; text-anchor: middle; cursor: default; } .statemap-tagbox { stroke: black; stroke-width: 0.5pt; alignment-baseline: hanging; text-anchor: start; cursor: default; } .statemap-tagbox-header { font-size: 9pt; font-weight: bold; text-anchor: start; font-style: oblique; cursor: default; } .statemap-tagbox-header-line { stroke: black; stroke-width: 1pt; } .statemap-tagbox-tag { font-size: 9pt; cursor: default; } .statemap-tagbox-tag-highlighted { font-weight: bold; } .statemap-tagbox-select-header { font-size: 8pt; text-anchor: start; font-style: oblique; cursor: default; } .statemap-tagbox-select { font-size: 8pt; text-anchor: start; cursor: default; } .statemap-tagbox-select-perc { font-size: 8pt; text-anchor: end; cursor: default; } .statemap-tagbox-select-header-line { stroke: black; stroke-width: 0.5pt; } .statemap-tagbox-select-sum-line { stroke: black; stroke-width: 0.25pt; } .statemap-tagbox-select-highlighted { font-weight: bold; } ================================================ FILE: src/statemap-svg.defs ================================================ ================================================ FILE: src/statemap-svg.js ================================================ /* * Copyright 2018, Joyent, Inc. */ /* * This file is dropped into the generated SVG -- and if you're looking at * the generated SVG and wondering where this comes from, look for * statemap-svg.js in statemap's src directory. */ var g_transMatrix = [1, 0, 0, 1, 0, 0]; /* transform of statemap */ var g_svgDoc; /* our SVG document */ var g_offset; /* x offset of statemap */ var g_timelabel; /* label for time spanned */ var g_timebar; /* timebar, if any */ var g_statebar; /* statebar, if any */ var g_height; /* pixel height of statemap */ var g_width; /* pixel width of statemap */ var g_statesel; /* state selection, if any */ var g_tagsel; /* tag selection, if any */ var g_tagvalsel; /* tag val selection, if any */ var g_statemaps = []; /* array of statemaps */ var timeunits = function (timeval) { var i, rem; var suffixes = [ 'ns', 'μs', 'ms', 's' ]; if (timeval === 0) return ('0'); for (i = 0; (timeval > 1000 || timeval < -1000) && i < suffixes.length - 1; i++) timeval /= 1000; rem = Math.floor((timeval - Math.floor(timeval)) * 1000); return (Math.floor(timeval) + '.' + (rem < 100 ? '0' : '') + (rem < 10 ? '0' : '') + rem + suffixes[i]); }; var timeFromMapX = function (mapX) { var base, offs; var timeWidth = globals.timeWidth; /* * Our base (in nanoseconds) is our X offset in the transformation * matrix as a ratio of our total (scaled) width, times our timeWidth. */ base = (-g_transMatrix[4] / (g_transMatrix[0] * g_width)) * timeWidth; /* * Our offset (in nanoseconds) is the X offset within the statemap * as a ratio of the statemap width, times the number of nanoseconds * visible in the statemap (which itself is the timeWidth divided by * our scaling factor). */ offs = (mapX / g_width) * (timeWidth / g_transMatrix[0]); return (base + offs); }; var timeToMapX = function (time) { /* * We take the ratio of the time of the timebar of the total time * width times the width times the scale, and then add that to the * X offset in the transformation matrix. */ return (((time / globals.timeWidth) * g_width * g_transMatrix[0]) + g_transMatrix[4]); }; var timeToText = function (time) { var t; if (g_transMatrix[0] === 1 && globals.begin === 0) { t = 'offset = ' + timeunits(time); } else { t = 'offset = ' + timeunits(time) + ', ' + timeunits(time + globals.begin) + ' overall'; } if (globals.start) { var s = globals.start[0] + (time + globals.start[1]) / 1000000000; t += ' (Epoch + ' + Math.floor(s) + 's)'; } return (t); }; var timeSetSpanLabel = function () { var t = 'span = ' + timeunits(globals.timeWidth / g_transMatrix[0]); if (g_transMatrix[0] != 1 || globals.begin !== 0) t += '; ' + timeToText(timeFromMapX(0)); g_timelabel.textContent = t; }; var initStatemap = function (statemap, elem, position) { var i, highlight; var prefix = globals.entityPrefix + statemap + '-'; g_statemaps[statemap].elem = elem; g_statemaps[statemap].position = position; g_statemaps[statemap].nentities = 0; /* * Iterate over this statemap's children, looking for entities. */ for (i = 0; i < elem.childNodes.length; i++) { var id = elem.childNodes[i].id, entity; if (!id || id.indexOf(prefix) !== 0) continue; entity = { name: id.substr(prefix.length), element: elem.childNodes[i], position: position++, statemap: statemap }; entity.description = g_statemaps[statemap].entities[entity.name].description; g_entities[id] = entity; g_statemaps[statemap].nentities++; } /* * Determine the legend that this statemap is using. */ for (i = statemap; i >= 0; i--) { if (g_svgDoc.getElementById('statemap-legend-' + i + '-0')) { g_statemaps[statemap].legend = i; break; } } console.assert(i >= 0); /* * Dynamically change the styling of the highlight rectangle. */ highlight = g_svgDoc.getElementById('statemap-' + statemap + '-highlight'); highlight.classList.add('statemap-highlight'); return (position); }; var init = function (evt) { var i = 0, position = 0, statemap; g_svgDoc = evt.target.ownerDocument; g_entities = []; while ((statemap = g_svgDoc.getElementById('statemap-' + i)) != null) position = initStatemap(i++, statemap, position); g_height = globals.pixelHeight; g_width = globals.pixelWidth; g_offset = evt.target.getAttributeNS(null, 'width') - (g_width + globals.tagWidth); g_timelabel = g_svgDoc.getElementById('statemap-timelabel'); timeSetSpanLabel(); g_timebar = undefined; }; var entityForEachDatum = function (entity, time, etime, func) { var data = g_statemaps[entity.statemap].data[entity.name]; var idx, length = data.length; var floor = 0; var ceil = length; var datum, t, span; if (length === 0 || (data[0].t > time && !etime)) return; if (data[0].t > time) { idx = 0; } else { /* * Binary search our data until we find a datum that contains * the start of our time range. */ for (;;) { idx = floor + Math.floor((ceil - floor) / 2); if (data[idx].t > time) { ceil = idx; continue; } if (idx + 1 == length || data[idx + 1].t > time) break; floor = idx; } } /* * If we don't have a specified etime, we have found the datum that * contains the time; just call our function and return. */ if (!etime) { func(data[idx], idx, 1); return; } /* * Now we're going to iterate forward, calling our function until we * get past our specified etime. */ for (; idx < length; idx++) { datum = data[idx]; if (datum.t > etime) return; if ((t = datum.t) < time) t = time; if (idx + 1 == length || data[idx + 1].t > etime) { /* * This datum contains the end of the range; our span * is our etime minus this datum's start time (or our * specified time, whichever is greater). */ span = etime - t; } else { /* * The end of the datum is covered by the range; our * span is the time width of the datum. */ span = data[idx + 1].t - t; } func(datum, idx, span); } }; var entityDatum = function (entity, idx) { var data = g_statemaps[entity.statemap].data[entity.name]; var datum = data[idx]; var rval = { time: datum.t }; if (datum.s instanceof Object) { rval.states = datum.s; } else { rval.state = datum.s; } if (idx + 1 < data.length) { rval.etime = data[idx + 1].t; } else { rval.etime = globals.timeWidth + globals.begin; } return (rval); }; var entityBreakdown = function (entity, time, etime) { var data = g_statemaps[entity.statemap].data[entity.name]; var rval = {}; var idx, length = data.length; var floor = 0; var ceil = length; var datum, t, span, state; time += g_statemaps[entity.statemap].offset; if (length === 0 || data[0].t > time) return ({}); /* * Binary search our data until we find a datum that contains the * specified time. */ for (;;) { idx = floor + Math.floor((ceil - floor) / 2); if (data[idx].t > time) { ceil = idx; continue; } if (idx + 1 == length || data[idx + 1].t > time) break; floor = idx; } /* * If we don't have a specified etime, we want to just return the state * breakdown at the specified time. */ if (!etime) { datum = data[idx]; if (datum.s instanceof Object) return (datum.s); rval[datum.s] = 1.0; return (rval); } /* * Now we're going to iterate forward until we get past our specified * etime. */ for (; idx < length; idx++) { datum = data[idx]; if (datum.t > etime) break; if ((t = datum.t) < time) t = time; if (idx + 1 == length || data[idx + 1].t > etime) { /* * This datum contains the end of the range; our span * is our etime minus this datum's start time (or our * specified time, whichever is greater). */ span = etime - t; } else { /* * The end of the datum is covered by the range; our * span is the time width of the datum. */ span = data[idx + 1].t - t; } /* * Express our span as a ratio of the overall time. */ span /= (etime - time); if (datum.s instanceof Object) { for (state in datum.s) { if (!rval.hasOwnProperty(state)) rval[state] = 0; rval[state] += (datum[state] * span); } } else { state = datum.s; if (!rval.hasOwnProperty(state)) rval[state] = 0; rval[state] += span; } } return (rval); }; var statebarCreateBar = function (statebar, x1, y1, x2, y2) { var parent = statebar.parent; var bar = g_svgDoc.createElementNS(parent.namespaceURI, 'line'); bar.classList.add('statemap-statebar'); bar.x1.baseVal.value = x1; bar.y1.baseVal.value = y1; bar.x2.baseVal.value = x2; bar.y2.baseVal.value = y2; parent.appendChild(bar); statebar.bars.push(bar); }; var statebarCreate = function (elem, idx) { var parent = g_statemaps[0].elem.parentNode.parentNode; var statebar = { parent: parent, hidden: false }; var entity = g_entities[elem.parentNode.id]; var statemap = g_statemaps[entity.statemap]; var states = statemap.states; var datum = entityDatum(entity, idx); var pos = (entity.position * globals.stripHeight) + (entity.statemap * globals.smargin); var x = globals.lmargin - 2; var y = globals.tmargin + pos; var elbow = { x: 8, y: 10 }; var nudge = { x: 3, y: 2 }; var direction = 1, anchor; var anchors = [ 'start', 'end' ]; var text; if (pos < (globals.totalHeight - globals.tmargin) / 2) { direction = 1; anchor = 1; } else { direction = -1; anchor = 0; } statebar.bars = []; /* * We have three bars to draw: our bar that runs the height of the * strip, followed by our elbow. */ statebarCreateBar(statebar, x, y, x, y + globals.stripHeight); y += 0.5 * globals.stripHeight; statebarCreateBar(statebar, x - elbow.x, y, x, y); x -= elbow.x; statebarCreateBar(statebar, x, y, x, y + (elbow.y * direction)); /* * Now create the text at the end of the elbow. */ y += (elbow.y + nudge.y) * direction; x += nudge.x; text = g_svgDoc.createElementNS(parent.namespaceURI, 'text'); text.classList.add('sansserif'); text.classList.add('statemap-statetext'); var t = statemap.entityKind + ' ' + entity.name; if (entity.description) t += ' (' + entity.description + ')'; if (datum.hasOwnProperty('state')) { t += ', ' + states[datum.state].name; } else { var i, total = 0, max = 0, maxstate; for (i in datum.states) { total += datum.states[i]; if (datum.states[i] > max) { maxstate = i; max = datum.states[i]; } } t += ', ' + Math.floor((datum.states[maxstate] / total) * 100); t += '% ' + states[maxstate].name; } t += ' at ' + timeunits(datum.time); t += ' for ' + timeunits(datum.etime - datum.time); text.appendChild(g_svgDoc.createTextNode(t)); text.setAttributeNS(null, 'x', x); text.setAttributeNS(null, 'y', y); text.setAttributeNS(null, 'transform', 'rotate(270,' + x + ',' + y + ')'); text.setAttributeNS(null, 'text-anchor', anchors[anchor]); text.addEventListener('click', function () { statebarRemove(statebar); stateselUpdate(); }); parent.appendChild(text); statebar.bars.push(text); statebar.entity = entity; if (g_statemaps.length == 1) return (statebar); /* * If we have more than one statemap, we want to add a bar to the right * side to indicate which statemap this is. */ var pos = (statemap.position * globals.stripHeight) + (entity.statemap * globals.smargin); x = globals.lmargin + g_width + 2; y = globals.tmargin + pos; var pos = (statemap.position * globals.stripHeight) + (entity.statemap * globals.smargin); var height = statemap.nentities * globals.stripHeight; statebarCreateBar(statebar, x, y, x, y + height); y += 0.5 * height; statebarCreateBar(statebar, x + elbow.x, y, x, y); x += elbow.x; statebarCreateBar(statebar, x, y, x, y + (elbow.y * direction)); /* * Now create the text at the end of the elbow. */ y += (elbow.y + nudge.y) * direction; x -= nudge.x; text = g_svgDoc.createElementNS(parent.namespaceURI, 'text'); text.classList.add('sansserif'); text.classList.add('statemap-statetext'); text.appendChild(g_svgDoc.createTextNode(statemap.title)); text.setAttributeNS(null, 'x', x); text.setAttributeNS(null, 'y', y); text.setAttributeNS(null, 'transform', 'rotate(90,' + x + ',' + y + ')'); text.setAttributeNS(null, 'text-anchor', anchors[anchor ^ 1]); parent.appendChild(text); statebar.bars.push(text); return (statebar); }; var statebarRemove = function (statebar) { var i; if (!statebar) return; if (statebar.bars) { for (i = 0; i < statebar.bars.length; i++) statebar.parent.removeChild(statebar.bars[i]); } statebar.bars = undefined; statebar.entity = undefined; }; var timebarRemove = function (timebar) { if (!timebar) return; timebarRemoveSubbar(timebar); if (timebar.bar && !timebar.hidden) { timebar.parent.removeChild(timebar.bar); timebar.parent.removeChild(timebar.text); } if (timebar.breakdown) { var i; for (i = 0; i < timebar.breakdown.length; i++) { var elem = timebar.breakdown[i]; elem.parentNode.removeChild(elem); } } timebar.bar = undefined; timebar.text = undefined; timebar.breakdown = undefined; }; var timebarSetBarLocation = function (bar, mapX) { var absX = mapX + g_offset; var nubheight = 15; bar.x1.baseVal.value = absX; bar.y1.baseVal.value = globals.tmargin - nubheight; bar.x2.baseVal.value = absX; bar.y2.baseVal.value = globals.tmargin + g_height; }; var timebarSetSubbarLocation = function (subbar, mapX, timebarX) { var absX = mapX + g_offset, x; var bar = subbar.bar; var span = subbar.span; var text = subbar.text; var nudge = { x: 0, y: 10 }; bar.x1.baseVal.value = absX; bar.y1.baseVal.value = globals.tmargin; bar.x2.baseVal.value = absX; bar.y2.baseVal.value = globals.tmargin + g_height; span.x1.baseVal.value = timebarX + g_offset; span.y1.baseVal.value = subbar.y; span.x2.baseVal.value = absX; span.y2.baseVal.value = subbar.y; x = (timebarX < mapX ? timebarX : mapX) + Math.abs(timebarX - mapX) / 2; text.setAttributeNS(null, 'text-anchor', 'middle'); text.setAttributeNS(null, 'x', x + g_offset); text.setAttributeNS(null, 'y', subbar.y + nudge.y); }; var timebarSetTextLocation = function (text, mapX) { var absX = mapX + g_offset; var nudge = { x: 3, y: 5 }; var direction, anchor; var time; /* * The side of the timebar that we actually render the text containing * the offset and the time depends on the location of our timebar with * respect to the center of the visible statemap. */ if (mapX < (g_width / 2)) { direction = 1; anchor = 'start'; } else { direction = -1; anchor = 'end'; } text.setAttributeNS(null, 'x', absX + (direction * nudge.x)); text.setAttributeNS(null, 'y', globals.tmargin - nudge.y); text.setAttributeNS(null, 'text-anchor', anchor); time = timeFromMapX(mapX); text.childNodes[0].textContent = timeToText(time); return (time); }; var timebarHideSubbar = function (timebar) { var parent, subbar; if (!timebar || !(subbar = timebar.subbar) || subbar.hidden) return; parent = timebar.parent; parent.removeChild(subbar.bar); parent.removeChild(subbar.span); parent.removeChild(subbar.text); subbar.hidden = true; }; var timebarShowSubbar = function (timebar) { var parent, subbar, mapX; if (!timebar || !(subbar = timebar.subbar) || !subbar.hidden) return; mapX = timeToMapX(subbar.time) if (mapX < 0 || mapX >= g_width) return; timebarSetSubbarLocation(subbar, mapX, timebar.x); parent = timebar.parent; parent.appendChild(subbar.bar); parent.appendChild(subbar.span); parent.appendChild(subbar.text); subbar.hidden = false; } var timebarHide = function (timebar) { if (!timebar || timebar.hidden || !timebar.bar) return; timebar.parent.removeChild(timebar.bar); timebar.parent.removeChild(timebar.text); timebar.hidden = true; timebarHideSubbar(timebar); }; var timebarShow = function (timebar) { var mapX; if (!timebar || !timebar.hidden) return; mapX = timeToMapX(timebar.time); if (mapX < 0 || mapX >= g_width) return; timebarSetBarLocation(timebar.bar, mapX); timebarSetTextLocation(timebar.text, mapX); timebar.x = mapX; timebar.parent.appendChild(timebar.bar); timebar.parent.appendChild(timebar.text); timebar.hidden = false; timebarShowSubbar(timebar); }; var timebarSetMiddle = function (timebar) { var mapX = g_width / 2; if (!timebar || !timebar.bar) return; /* * This is just an algebraic rearrangement of the mapX calculation * in timebarShow(), above. */ g_transMatrix[4] = -(((timebar.time / globals.timeWidth) * g_width * g_transMatrix[0]) - mapX); }; var timebarSetBreakdown = function (time) { var breakdown, state, total = []; var entity; var sum = {}; var rval = []; var click = function (statemap, s) { return (function (evt) { legendclick(evt, statemap, s); }); }; time += globals.begin; for (entity in g_entities) { var statemap = g_statemaps[g_entities[entity].statemap].legend; breakdown = entityBreakdown(g_entities[entity], time); if (!total[statemap]) { total[statemap] = {}; sum[statemap] = 0; } for (state in breakdown) { if (!total[statemap].hasOwnProperty(state)) total[statemap][state] = 0; sum[statemap] += breakdown[state]; total[statemap][state] += breakdown[state]; } } var settotal = function (statemap, state) { var legend, parent, text; var x, y, width, height, t; var nudge = 3; /* * Iterate down until we find a valid legend. We know that * that there will be at least one, but we break out of the * loop anyway if we don't find it to allow the failure mode * here to be an unreferenced property rather than an * inifinite loop. */ legend = g_svgDoc.getElementById('statemap-legend-' + statemap + '-' + state); parent = legend.parentNode; x = parseInt(legend.getAttributeNS(null, 'x'), 10); y = parseInt(legend.getAttributeNS(null, 'y'), 10); width = parseInt(legend.getAttributeNS(null, 'width'), 10); height = parseInt(legend.getAttributeNS(null, 'height'), 10); t = Math.floor(total[statemap][state]) + ' (' + Math.floor((total[statemap][state] / sum[statemap]) * 100) + '%)'; text = g_svgDoc.createElementNS(parent.namespaceURI, 'text'); text.classList.add('sansserif'); text.classList.add('statemap-timebreaktext'); text.appendChild(g_svgDoc.createTextNode(t)); text.setAttributeNS(null, 'x', x + (width / 2)); text.setAttributeNS(null, 'y', y + (height / 2) + nudge); text.setAttributeNS(null, 'text-anchor', 'middle'); text.addEventListener('click', click(statemap, g_statemaps[statemap].states[state].value)); parent.appendChild(text); rval.push(text); }; for (statemap in total) { for (state in total[statemap]) settotal(statemap, state); } return (rval); }; var timebarCreate = function (mapX) { var parent = g_statemaps[0].elem.parentNode.parentNode; var bar, text; var timebar = { parent: parent, hidden: false }; bar = g_svgDoc.createElementNS(parent.namespaceURI, 'line'); bar.classList.add('statemap-timebar'); timebarSetBarLocation(bar, mapX); parent.appendChild(bar); text = g_svgDoc.createElementNS(parent.namespaceURI, 'text'); text.classList.add('sansserif'); text.classList.add('statemap-timetext'); text.appendChild(g_svgDoc.createTextNode('')); timebar.time = timebarSetTextLocation(text, mapX); timebar.breakdown = timebarSetBreakdown(timebar.time); timebar.x = mapX; text.addEventListener('click', function () { timebarRemove(timebar); stateselUpdate(); }); parent.appendChild(text); timebar.bar = bar; timebar.text = text; return (timebar); }; var timebarCreateSubbar = function (timebar, mapX, absY) { var parent = timebar.parent; var subbar, bar, span, text, time, delta; bar = g_svgDoc.createElementNS(parent.namespaceURI, 'line'); bar.classList.add('statemap-subbar'); span = g_svgDoc.createElementNS(parent.namespaceURI, 'line'); span.classList.add('statemap-subbar-span'); time = timeFromMapX(mapX); delta = Math.abs(timebar.time - time); text = g_svgDoc.createElementNS(parent.namespaceURI, 'text'); text.classList.add('sansserif'); text.classList.add('statemap-subbar-text'); text.appendChild(g_svgDoc.createTextNode(timeunits(delta))); var subbar = { bar: bar, span: span, text: text, time: time, y: absY, hidden: false }; timebarSetSubbarLocation(subbar, mapX, timebar.x); parent.appendChild(bar); parent.appendChild(span); parent.appendChild(text); timebar.subbar = subbar; } var timebarRemoveSubbar = function (timebar) { var subbar = timebar.subbar; if (!subbar) return; if (!subbar.hidden) { timebar.parent.removeChild(subbar.bar); timebar.parent.removeChild(subbar.span); timebar.parent.removeChild(subbar.text); } timebar.subbar = undefined; } var stateselTagvalSelect = function (evt, tagval) { var tagdefs = {}; var i, entity; var state, tags; var child; var highlight = 'statemap-tagbox-select-highlighted'; if (g_statesel == undefined) return; state = g_statesel.state; tags = g_statemaps[g_statesel.statemap].tags; if (g_tagvalsel && g_tagvalsel.selected) { for (i = 0; i < g_tagvalsel.selected.length; i++) { child = g_tagvalsel.selected[i]; child.removeAttribute('fill-opacity'); } if (g_tagvalsel.element) g_tagvalsel.element.classList.remove(highlight); /* * If our selection matches the selection that we have already * made, then we are unselecting this tag value; we need only * return. */ if (g_tagvalsel.tag == g_tagsel.tag && g_tagvalsel.tagval == tagval) { g_tagvalsel = undefined; return; } } g_tagvalsel = { selected: [], tag: g_tagsel.tag, tagval: tagval }; evt.target.classList.add(highlight); g_tagvalsel.element = evt.target; /* * Iterate over all of our tag definitions, looking for a match where * the specified tag (for the specified state) matches the specified * tag value. */ for (i = 0; i < tags.length; i++) { if (tags[i].state != state) continue; if (tags[i][g_tagsel.tag] != tagval) continue; tagdefs[i] = true; } /* * Now for each entity, we will plow through every rectangle. */ for (id in g_entities) { var entity = g_entities[id]; var elem = entity.element; var data = g_statemaps[entity.statemap].data[entity.name]; var j = 0; for (i = 0; i < elem.childNodes.length; i++) { child = elem.childNodes[i]; if (child.nodeName != 'rect') continue; var datum = data[j++]; var tag; if (datum.s instanceof Object) { if (!datum.s[state]) continue; } else { if (datum.s != state) continue; } if (!datum.g) continue; var ratio = 0; for (tag in datum.g) { if (tagdefs[tag]) ratio += datum.g[tag]; } if (ratio === 0) continue; /* * At this point we have found a rectangle that we * want to color, and we know the degree that we * want to color it! */ child.setAttributeNS(null, 'fill-opacity', 1 - ratio); g_tagvalsel.selected.push(child); } } }; var stateselUpdate = function () { var base, etime, nentities = 0; var state, entity; var bytag = {}, tagval; var header, i, tags; if (g_statesel == undefined) return; state = g_statesel.state; tags = g_statemaps[g_statesel.statemap].tags; var sum = function (datum, id, span) { var tid, tag; if (!(datum.s instanceof Object)) { if (datum.s != state) return; } else { var ratio; if (!(ratio = datum.s[state])) return; } if (!datum.g) return; for (tid in datum.g) { tag = tags[tid]; if (tag.state != state) continue; if (!(tagval = tag[g_tagsel.tag])) continue; if (!bytag[tagval]) bytag[tagval] = 0; bytag[tagval] += span * datum.g[tid]; } }; if (!g_tagsel) return; header = ''; if (g_statebar && g_statebar.entity) { header = g_statemaps[g_statesel.statemap].entityKind + ' ' + g_statebar.entity.name + ' '; } header += 'by ' + g_tagsel.tag + ' '; if (g_timebar && g_timebar.bar) { base = g_timebar.time + globals.begin; etime = 0; header += 'at ' + timeunits(g_timebar.time); } else { base = timeFromMapX(0) + globals.begin; etime = timeFromMapX(g_width) + globals.begin; header += 'over span'; } header = header.charAt(0).toUpperCase() + header.substr(1) + ':'; if (g_statebar && g_statebar.entity) { entityForEachDatum(g_statebar.entity, base, etime, sum); nentities++; } else { /* * For each entity, we need to determine the amount of time * in our selected state. */ for (entity in g_entities) { entityForEachDatum(g_entities[entity], base, etime, sum); nentities++; } } var sorted = Object.keys(bytag).sort(function (lhs, rhs) { if (bytag[lhs] < bytag[rhs]) { return (1); } else if (bytag[lhs] > bytag[rhs]) { return (-1); } else { return (0); } }); var divisor; if (etime === 0) { divisor = nentities; } else { divisor = (etime - base) * nentities; } var x = g_statesel.x; var y = g_statesel.y + 10; var elem = g_svgDoc.getElementById('statemap-tagbox-select'); while (elem.childNodes.length > 0) elem.removeChild(elem.childNodes[0]); if (g_tagvalsel && g_tagvalsel.element) g_tagvalsel.element = undefined; var text = g_svgDoc.createElementNS(elem.namespaceURI, 'text'); text.classList.add('statemap-tagbox-select-header'); text.classList.add('sansserif'); text.appendChild(g_svgDoc.createTextNode(header)); text.setAttributeNS(null, 'x', x); text.setAttributeNS(null, 'y', y); elem.appendChild(text); y += 9; var line = g_svgDoc.createElementNS(elem.namespaceURI, 'line'); line.classList.add('statemap-tagbox-select-header-line'); line.x1.baseVal.value = x - 2; line.y1.baseVal.value = y; line.x2.baseVal.value = g_statesel.x2; line.y2.baseVal.value = y; elem.appendChild(line); y += 18; var bmargin = 60; var ttl = 0; var ellipsis = false; var click = function (tv) { return (function (evt) { stateselTagvalSelect(evt, tv); }); }; for (i = 0; i <= sorted.length; i++) { var t, perc; if (i < sorted.length) { perc = (bytag[sorted[i]] / divisor) * 100.0; tagval = sorted[i]; ttl += perc; if (y > globals.totalHeight - bmargin) { if (ellipsis) continue; ellipsis = true; tagval = '...'; } } else { perc = ttl; tagval = 'total'; y -= 5; line = g_svgDoc.createElementNS(elem.namespaceURI, 'line'); line.classList.add('statemap-tagbox-select-sum-line'); line.x1.baseVal.value = x - 2; line.y1.baseVal.value = y; line.x2.baseVal.value = g_statesel.x2; line.y2.baseVal.value = y; elem.appendChild(line); y += 15; } if (i != sorted.length && ellipsis) { t = '...'; } else { t = Math.trunc(perc) + '.' + (Math.round(perc * 100) % 100) + '%'; } text = g_svgDoc.createElementNS(elem.namespaceURI, 'text'); text.classList.add('statemap-tagbox-select-perc'); text.classList.add('sansserif'); text.appendChild(g_svgDoc.createTextNode(t)); text.setAttributeNS(null, 'x', x + 45); text.setAttributeNS(null, 'y', y); elem.appendChild(text); text = g_svgDoc.createElementNS(elem.namespaceURI, 'text'); text.classList.add('statemap-tagbox-select'); text.classList.add('sansserif'); text.appendChild(g_svgDoc.createTextNode(tagval)); text.setAttributeNS(null, 'x', x + 50); text.setAttributeNS(null, 'y', y); /* * If we already have a tag value selection and it matches * what we're about to display, indicate as much by * highlighting it. */ if (g_tagvalsel && g_tagvalsel.tag == g_tagsel.tag && g_tagvalsel.tagval == tagval) { var highlight = 'statemap-tagbox-select-highlighted'; text.classList.add(highlight); g_tagvalsel.element = text; } text.addEventListener('click', click(tagval)); elem.title = t; elem.appendChild(text); y += 15; } }; var stateselTagSelect = function (evt, tag) { var elem, prefix = 'statemap-tagbox-tag-'; if (g_tagsel) { elem = g_svgDoc.getElementById(prefix + g_tagsel.tag); elem.classList.remove(prefix + 'highlighted'); if (g_tagsel.tag == tag) { g_tagsel = undefined; stateselUpdate(); return; } } elem = g_svgDoc.getElementById(prefix + tag); elem.classList.add(prefix + 'highlighted'); g_tagsel = { tag: tag }; stateselUpdate(); }; var stateselClearTagbox = function () { var tagbox = g_svgDoc.getElementById('statemap-tagbox'), elem; if (!tagbox) return; while (tagbox.childNodes.length > 0) tagbox.removeChild(tagbox.childNodes[0]); elem = g_svgDoc.getElementById('statemap-tagbox-select'); while (elem.childNodes.length > 0) elem.removeChild(elem.childNodes[0]); }; var stateselSelect = function (statemap, state) { var legend = g_svgDoc.getElementById('statemap-legend-' + g_statemaps[statemap].legend + '-' + state); var states = g_statemaps[statemap].states; var alltags = g_statemaps[statemap].tags; var tags = {}; var i, t; var lmargin = 20; var offset = globals.lmargin + globals.pixelWidth; legend.classList.add('statemap-legend-highlighted'); stateselClearTagbox(); t = 'tags for ' + states[state].name; var tagbox = g_svgDoc.getElementById('statemap-tagbox'); var x = offset + lmargin; var y = globals.tmargin; var x2 = x + (globals.tagWidth - lmargin); var text = g_svgDoc.createElementNS(tagbox.namespaceURI, 'text'); text.classList.add('statemap-tagbox-header'); text.classList.add('sansserif'); text.appendChild(g_svgDoc.createTextNode(t)); text.setAttributeNS(null, 'x', x); text.setAttributeNS(null, 'y', y); tagbox.appendChild(text); y += 10; var line = g_svgDoc.createElementNS(tagbox.namespaceURI, 'line'); line.classList.add('statemap-tagbox-header-line'); line.x1.baseVal.value = x - 2; line.y1.baseVal.value = y; line.x2.baseVal.value = x2; line.y2.baseVal.value = y; tagbox.appendChild(line); y += 20; /* * Now add text for each possible tag for this state. */ for (i = 0; i < alltags.length; i++) { if (alltags[i].state !== state) continue; for (t in alltags[i]) { if (t == 'state' || t == 'tag') continue; tags[t] = true; } } tags = Object.keys(tags).sort(); var click = function (tag) { return (function (evt) { stateselTagSelect(evt, tag); }); }; for (i = 0; i < tags.length; i++) { text = g_svgDoc.createElementNS(tagbox.namespaceURI, 'text'); text.classList.add('statemap-tagbox-tag'); text.classList.add('sansserif'); text.id = 'statemap-tagbox-tag-' + tags[i]; text.appendChild(g_svgDoc.createTextNode(tags[i])); text.setAttributeNS(null, 'x', x); text.setAttributeNS(null, 'y', y); text.addEventListener('click', click(tags[i])); tagbox.appendChild(text); y += 18; } g_statesel = { statemap: statemap, state: state, x: x, y: y, x2: x2 }; stateselUpdate(); }; var stateselClear = function () { var state, statemap, legend; if (g_statesel == undefined) return (-1); state = g_statesel.state; statemap = g_statesel.statemap; legend = g_svgDoc.getElementById('statemap-legend-' + statemap + '-' + state); legend.classList.remove('statemap-legend-highlighted'); stateselClearTagbox(); g_statesel = undefined; g_tagsel = undefined; return (state); }; var statemapsUpdate = function () { var i; var newMatrix = 'matrix(' + g_transMatrix.join(' ') + ')'; for (i = 0; i < g_statemaps.length; i++) { g_statemaps[i].elem.setAttributeNS(null, 'transform', newMatrix); } }; /* * All of the following *click() functions are added at the time of statemap * generation. */ var legendclick = function (evt, statemap, state) { if (globals.notags || stateselClear() == state) return; stateselSelect(statemap, state); stateselUpdate(); }; var mapclick = function (evt, idx) { var x = evt.clientX - g_offset; if (evt.shiftKey || evt.altKey) { if (!g_timebar || !g_timebar.bar) return; timebarRemoveSubbar(g_timebar); timebarCreateSubbar(g_timebar, x, evt.clientY); return; } timebarRemove(g_timebar); g_timebar = timebarCreate(x); statebarRemove(g_statebar); g_statebar = statebarCreate(evt.target, idx); stateselUpdate(); }; var panclick = function (dx, dy) { var minX = -(g_width * g_transMatrix[0] - g_width); var minY = -(g_height * g_transMatrix[0] - g_height); g_transMatrix[4] += dx; g_transMatrix[5] += dy; timebarHide(g_timebar); if (g_transMatrix[4] > 0) g_transMatrix[4] = 0; if (g_transMatrix[4] < minX) g_transMatrix[4] = minX; if (g_transMatrix[5] > 0) g_transMatrix[5] = 0; if (g_transMatrix[5] < minY) g_transMatrix[5] = minY; timeSetSpanLabel(); statemapsUpdate(); timebarShow(g_timebar); stateselUpdate(); }; var zoomclick = function (scale) { var i; timebarHide(g_timebar); for (i = 0; i < g_transMatrix.length; i++) { /* * We don't scale the Y direction on a zoom. */ if (i != 3) g_transMatrix[i] *= scale; } var minX = -(g_width * g_transMatrix[0] - g_width); var minY = -(g_height * g_transMatrix[0] - g_height); g_transMatrix[4] += (1 - scale) * g_width / 2; timebarSetMiddle(g_timebar); if (g_transMatrix[4] > 0) g_transMatrix[4] = 0; if (g_transMatrix[4] < minX) g_transMatrix[4] = minX; if (g_transMatrix[5] > 0) g_transMatrix[5] = 0; if (g_transMatrix[5] < minY) g_transMatrix[5] = minY; if (g_transMatrix[0] < 1) g_transMatrix = [1, 0, 0, 1, 0, 0]; timeSetSpanLabel(); statemapsUpdate(); timebarShow(g_timebar); stateselUpdate(); }; ================================================ FILE: src/statemap.rs ================================================ /* * Copyright 2020 Joyent, Inc. and other contributors */ extern crate memmap; extern crate serde; extern crate serde_json; extern crate natord; extern crate palette; extern crate rand; /* * The StatemapInput* types denote the structure of the concatenated JSON * in the input file. */ #[derive(Deserialize, Debug)] #[serde(deny_unknown_fields)] struct StatemapInputState { color: Option, // color for state, if any value: usize, // value for state } #[derive(Deserialize, Debug)] #[serde(deny_unknown_fields)] struct StatemapInputDatum { #[serde(deserialize_with = "datum_time_from_string")] time: u64, // time of this datum entity: String, // name of entity state: u32, // state entity is in at time tag: Option, // tag for this state, if any } #[derive(Deserialize, Debug)] #[serde(deny_unknown_fields)] struct StatemapInputDescription { entity: String, // name of entity description: String, // description of entity } #[derive(Deserialize, Debug)] #[allow(non_snake_case)] #[serde(deny_unknown_fields)] struct StatemapInputMetadata { start: Vec, title: String, host: Option, entityKind: Option, states: HashMap, } #[derive(Deserialize, Debug)] #[serde(deny_unknown_fields)] struct StatemapInputEvent { time: String, // time of this datum entity: String, // name of entity event: String, // type of event target: Option, // target for event, if any } #[derive(Deserialize, Debug)] struct StatemapInputTag { state: u32, // state for this tag tag: String, // tag itself } #[derive(Copy,Clone,Debug)] pub struct Config { pub maxrect: u64, // maximum number of rectangles pub abstime: bool, // time is absolute, not relative pub begin: i64, // absolute/relative time to begin pub end: i64, // absolute/relative time to end pub notags: bool, // do not include tags } /* * These fields are dropped directly into the SVG. */ #[derive(Debug,Serialize)] #[allow(non_snake_case)] pub struct StatemapSVGConfig { pub stripHeight: u32, pub legendWidth: u32, pub tagWidth: u32, pub stripWidth: u32, pub background: String, pub sortby: Option, pub stacksortby: Option, } #[derive(Copy,Clone,Debug)] struct StatemapColor { color: Color, // underlying color } #[derive(Debug)] struct StatemapRect { start: u64, // nanosecond offset duration: u64, // nanosecond duration weight: u64, // my weight + neighbors states: Vec, // time spent in each state prev: Option, // previous rectangle next: Option, // next rectangle tags: Option>, // tags, if any } #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] struct StatemapRectWeight { weight: u64, // weight for this rect start: u64, // start time for this rect entity: usize, // entity for this rect } #[derive(Default,Clone,PartialEq,Eq,Debug,Serialize)] struct StatemapState { name: String, // name of this state value: usize, // value for this state color: Option, // color of this state, if any } #[derive(Debug)] struct StatemapEntity { name: String, // name of this entity id: usize, // identifier description: Option, // description, if any last: Option, // last start time start: Option, // current start time state: Option, // current state tag: Option, // current tag, if any rects: HashMap>, // rectangles for this entity } #[derive(Debug)] pub struct Statemap { config: Config, // configuration metadata: Option, // in-stream metadata nrecs: u64, // number of records nevents: u64, // number of events entities: HashMap, // hash of entities states: Vec, // vector of valid states byid: Vec, // entities by ID byweight: BTreeSet, // rectangles by weight tags: HashMap<(u32, String), (Value, usize)>, // tags, if any begin: u64, // begin time, as ns since epoch end: u64, // end time, as ns since epoch last: u64, // last time seen } #[derive(Debug)] pub struct StatemapError { errmsg: String } #[derive(Serialize)] #[allow(non_snake_case)] struct StatemapSVGGlobals<'a> { begin: i64, end: i64, entityPrefix: String, pixelHeight: u32, pixelWidth: u32, totalHeight: u32, timeWidth: u64, lmargin: u32, tmargin: u32, smargin: u32, states: &'a Vec, start: &'a Vec, entityKind: &'a str, } #[derive(Serialize)] #[allow(non_snake_case)] struct StatemapSVGLocals<'a> { offset: i64, states: &'a Vec, entityKind: &'a str, title: String, } pub struct StatemapSVG<'a> { config: &'a StatemapSVGConfig, } use std::fs::File; use std::str; use std::error::Error; use std::fmt; use std::collections::HashMap; use std::collections::HashSet; use std::collections::BTreeSet; use std::str::FromStr; use std::cell::RefCell; use std::cmp; use std::path::Path; use self::memmap::MmapOptions; use self::palette::{Srgb, Color, Mix}; use self::serde_json::Value; impl Default for Config { fn default() -> Config { Config { maxrect: 25000, begin: 0, end: 0, notags: false, abstime: false, } } } impl Default for StatemapSVGConfig { fn default() -> StatemapSVGConfig { StatemapSVGConfig { stripHeight: 10, legendWidth: 138, stripWidth: 862, tagWidth: 250, background: "#f0f0f0".to_string(), sortby: None, stacksortby: None, } } } impl StatemapError { fn new(msg: &str) -> StatemapError { StatemapError { errmsg: msg.to_string() } } } impl fmt::Display for StatemapError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.errmsg) } } impl Error for StatemapError { fn description(&self) -> &str { &self.errmsg } } impl FromStr for StatemapColor { type Err = StatemapError; fn from_str(name: &str) -> Result { let named = palette::named::from_str(name); match named { Some(color) => { let rgb = Srgb::::from_format(color); return Ok(StatemapColor { color: rgb.into_format().into_linear().into() }); } None => {} } if name.len() == 7 && name.chars().next().unwrap() == '#' { let r = u8::from_str_radix(&name[1..3], 16); let g = u8::from_str_radix(&name[3..5], 16); let b = u8::from_str_radix(&name[5..7], 16); if r.is_ok() && g.is_ok() && b.is_ok() { let rgb = Srgb::new(r.unwrap(), g.unwrap(), b.unwrap()); return Ok(StatemapColor { color: rgb.into_format().into_linear().into() }); } } return Err(StatemapError { errmsg: format!("\"{}\" is not a valid color", name) }); } } impl fmt::Display for StatemapColor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let rgb = Srgb::from_linear(self.color.into()).into_components(); write!(f, "rgb({}, {}, {})", (rgb.0 * 256.0) as u8, (rgb.1 * 256.0) as u8, (rgb.2 * 256.0) as u8) } } impl StatemapColor { fn random() -> Self { let rgb = Srgb::new(rand::random::(), rand::random::(), rand::random::()); StatemapColor { color: rgb.into_format().into_linear().into() } } fn _mix(&self, other: &Self, ratio: f32) -> Self { StatemapColor { color: self.color.mix(&other.color, ratio) } } fn mix_nonlinear(&self, other: &Self, ratio: f32) -> Self { let lhs = Srgb::from_linear(self.color.into()).into_components(); let rhs = Srgb::from_linear(other.color.into()).into_components(); let recip = 1.0 - ratio; let rgb = Srgb::::new(lhs.0 as f32 * recip + rhs.0 as f32 * ratio, lhs.1 as f32 * recip + rhs.1 as f32 * ratio, lhs.2 as f32 * recip + rhs.2 as f32 * ratio); StatemapColor { color: rgb.into_format().into_linear().into() } } } impl StatemapRect { fn new(start: u64, duration: u64, state: u32, nstates: u32) -> Self { let mut r = StatemapRect { start: start, duration: duration, states: vec![0; nstates as usize], prev: None, next: None, weight: duration, tags: None, }; r.states[state as usize] = duration; r } } fn subsume_tags(stags: &mut HashMap, vtags: &mut HashMap) { for (id, duration) in vtags.drain() { if let Some(d) = stags.get_mut(&id) { *d += duration; continue; } stags.insert(id, duration); } } impl StatemapEntity { fn new(name: &str, id: usize) -> Self { StatemapEntity { name: name.to_string(), start: None, description: None, last: None, state: None, tag: None, rects: HashMap::new(), id: id, } } fn newrect(&mut self, end: u64, nstates: u32) -> (Option<(u64, u64, u64)>, (u64, u64)) { let start = self.start.unwrap(); let state = self.state.unwrap(); let lhs: Option<(u64, u64, u64)>; let rhs: (u64, u64); let mut rect = StatemapRect::new(start, end - start, state, nstates); match self.tag { Some(id) => { let mut hash: HashMap = HashMap::new(); hash.insert(id, end - start); rect.tags = Some(hash); } _ => {} } rect.prev = self.last; match self.last { Some(last) => { let mut lrect = self.rects.get(&last).unwrap().borrow_mut(); let old = lrect.weight; lrect.next = Some(start); rect.weight += lrect.duration; lrect.weight += rect.duration; lhs = Some((lrect.start, old, lrect.weight)); } _ => { lhs = None; } } rhs = (rect.start, rect.weight); self.rects.insert(start, RefCell::new(rect)); (lhs, rhs) } fn addto(&mut self, rect: u64, delta: u64) -> u64 { let mut r = self.rects.get(&rect).unwrap().borrow_mut(); let old = r.weight; r.weight += delta; old } fn subsume(&mut self, victim: u64) -> ((Option, u64), (u64, u64), (u64, u64), (Option, u64)) { let mut last = self.last; let subsumed: u64; let rval; /* * We return three weights that need to be adjusted: that of the * rectangle to the left (post-subsume), that of the rectangle to * the right (post-subsume) and that of the center rectangle. Each * of these adjustments is described as a start plus a weight to be * added -- and all three are returned as a tuple that also includes * the subsumed rectangle that needs to be removed. */ let ldelta: (Option, u64); let cdelta: (u64, u64); let rdelta: (Option, u64); /* * We create a scope here to help out the borrow checker in terms of * knowing that our immutable borrow of self.rects is being dropped * before our mutable borrow of it, below. */ { let left: &RefCell; let right: &RefCell; /* * We create a scope here to allow the borrow of the victim * cell fall out of scope as we may need it to be mutable, below. */ { let vcell = self.rects.get(&victim).unwrap(); let v = vcell.borrow(); match (v.prev, v.next) { (None, None) => panic!("nothing to subsume"), (Some(prev), None) => { left = self.rects.get(&prev).unwrap(); right = vcell; let lref = left.borrow(); ldelta = (lref.prev, v.duration); cdelta = (lref.start, 0); rdelta = (None, 0); } (None, Some(next)) => { left = vcell; right = self.rects.get(&next).unwrap(); /* * We want the weight of the remaining (center) * rectangle to be the weight of our right rectangle; * to express this as a delta, we express it as the * difference between the two. */ let rref = right.borrow(); ldelta = (None, 0); cdelta = (v.start, rref.weight - v.weight); rdelta = (rref.next, v.duration); } (Some(prev), Some(next)) => { /* * We want whichever of our neighboring rectangles is * shorter to subsume us. */ let l = self.rects.get(&prev).unwrap(); let r = self.rects.get(&next).unwrap(); let lref = l.borrow(); let rref = r.borrow(); if lref.duration < rref.duration { left = l; right = vcell; ldelta = (lref.prev, v.duration); cdelta = (lref.start, v.weight - (lref.duration + v.duration)); rdelta = (Some(rref.start), lref.duration); } else { left = vcell; right = r; ldelta = (Some(lref.start), rref.duration); cdelta = (v.start, rref.weight - (rref.duration + v.duration)); rdelta = (rref.next, v.duration); } } } } let mut s = left.borrow_mut(); let mut v = right.borrow_mut(); s.next = v.next; /* * Set our subsumed next rectangle's previous to point back to us * rather than the subsumed rectangle. */ match s.next { Some(next) => { self.rects.get(&next).unwrap() .borrow_mut().prev = Some(s.start); } None => { last = Some(s.start); } } /* * Add our duration, and then sum the value in each of the states. */ s.duration += v.duration; for i in 0..v.states.len() { s.states[i] += v.states[i]; } /* * If our victim has tags, we need to fold them in. */ if v.tags.is_some() && s.tags.is_none() { s.tags = Some(HashMap::new()); } match s.tags { Some(ref mut stags) => { match v.tags { Some(ref mut vtags) => { subsume_tags(stags, vtags); }, None => {} } }, None => {} } subsumed = v.start; rval = (v.start, v.weight); } /* * Okay, we're done subsuming! We can remove the subsumed rectangle. */ self.rects.remove(&subsumed); self.last = last; (ldelta, cdelta, rval, rdelta) } #[must_use] fn apply(&mut self, deltas: ((Option, u64), (u64, u64), (u64, u64), (Option, u64))) -> Vec<(u64, u64, Option)> { let mut updates: Vec<(u64, u64, Option)> = vec![]; /* * Handle the left delta. */ match (deltas.0).0 { Some(rect) => { let delta = (deltas.0).1; updates.push((rect, self.addto(rect, delta), Some(delta))); } None => {} } /* * Handle the center delta. */ let rect = (deltas.1).0; let delta = (deltas.1).1; updates.push((rect, self.addto(rect, delta), Some(delta))); /* * Handle the subsumed rectangle by pushing a delta update of None. */ updates.push(((deltas.2).0, (deltas.2).1, None)); /* * And finally, the right delta. */ match (deltas.3).0 { Some(rect) => { let delta = (deltas.3).1; updates.push((rect, self.addto(rect, delta), Some(delta))); } None => {} } updates } fn output_svg(&self, id: usize, begin: i64, config: &StatemapSVGConfig, globals: &StatemapSVGGlobals, locals: &StatemapSVGLocals, colors: &Vec, y: u32) -> Vec { let rect_width = |rect: &StatemapRect| -> f64 { /* * We add a fuzz factor to our width to assure it will always be * nearly (but not quite!) half a pixel wider than it should be. * This assures that none of the background (which is deliberately a * bright color) comes through at the border of rectangles, without * losing any accuracy (the next rectangle will tile over ours at * an unadjusted offset). */ ((rect.duration as f64 / globals.timeWidth as f64) * globals.pixelWidth as f64) + 0.4 as f64 }; let output_tags = |rect: &StatemapRect, datum: &mut String| { /* * If we have tags, we emit them in ID order. */ if let Some(ref tags) = rect.tags { let mut g: Vec<(usize, u64)>; datum.push_str(", g: {"); g = tags.iter() .map(|(&id, &duration)| { (id, duration) }) .collect(); g.sort_unstable(); for j in 0..g.len() { let ratio = g[j].1 as f64 / rect.duration as f64; datum.push_str(&format!("'{}': {:.3}{}", g[j].0, ratio, if j < g.len() - 1 { "," } else { "" })); } datum.push_str("}"); } }; let background = |x: f64, width: f64| { if width > 0.0 { println!(r##""##, x, y, width, config.stripHeight, config.background); } }; let mut x: f64 = 0.0; let mut map: Vec; let mut data: Vec = vec![]; map = self.rects.values().map(|r| r.borrow().start as i64).collect(); map.sort(); if map.len() >= 1 && map[0] > begin { background(0.0, ((map[0] - begin) as f64 / globals.timeWidth as f64) * globals.pixelWidth as f64); } println!(r##"{} {}"##, globals.entityPrefix, id, self.name, locals.entityKind, self.name); for i in 0..map.len() { let rect = self.rects.get(&(map[i] as u64)).unwrap().borrow(); let mut state = None; let mut blended = false; let w = rect_width(&rect); x = ((map[i] - begin) as f64 / globals.timeWidth as f64) * globals.pixelWidth as f64; for j in 0..rect.states.len() { if rect.states[j] != 0 { match state { None => { state = Some(j) }, Some(_s) => { blended = true; break; } } } } if !blended { assert!(state.is_some()); let mut datum = format!("{{ \"t\": {}, \"s\": {}", rect.start, state.unwrap()); output_tags(&rect, &mut datum); datum.push_str("}"); data.push(datum); println!(concat!(r##""##), x, y, w, config.stripHeight, data.len() - 1, colors[state.unwrap()]); x += w; continue; } let max = rect.states.iter().enumerate() .max_by(|&(_, lhs), &(_, rhs)| lhs.cmp(rhs)).unwrap().0; let mut color = colors[max]; let mut datum = format!("{{ t: {}, s: {{ ", rect.start); let mut comma = ""; for j in 0..rect.states.len() { if rect.states[j] == 0 { continue; } let ratio = rect.states[j] as f64 / rect.duration as f64; datum.push_str(&format!("{}'{}': {:.3}", comma, j, ratio)); comma = ", "; if j != max { color = color.mix_nonlinear(&colors[j], ratio as f32); } } datum.push_str("}"); output_tags(&rect, &mut datum); datum.push_str("}"); data.push(datum); println!(concat!(r##""##), x, y, w, config.stripHeight, data.len() - 1, color); x += w; } println!(""); /* * Finally, add a background rectangle that covers whatever remains * of our width. */ background(x, globals.pixelWidth as f64 - x); data } #[cfg(test)] fn print(&self, header: &str) { let mut v: Vec; let l: usize; v = self.rects.values().map(|r| r.borrow().start).collect(); v.sort(); l = v.len(); for i in 0..l { let me = self.rects.get(&v[i]).unwrap().borrow(); println!("{}: entity={}: [{}] {:?}: {:?}", header, self.id, i, v[i], me); } println!("{}: entity={}: last is {:?}", header, self.id, self.last); } #[cfg(test)] fn verify(&self) { let mut v: Vec; let l: usize; v = self.rects.values().map(|r| r.borrow().start).collect(); v.sort(); l = v.len(); for i in 0..l { let me = self.rects.get(&v[i]).unwrap().borrow(); let mut weight = me.duration; if i < l - 1 { let next = self.rects.get(&v[i + 1]).unwrap().borrow(); assert_eq!(me.next, Some(next.start)); assert!(me.start < next.start); weight += next.duration; } else { assert_eq!(me.next, None); assert_eq!(self.last, Some(me.start)); } if i > 0 { let prev = self.rects.get(&v[i - 1]).unwrap().borrow(); assert_eq!(me.prev, Some(prev.start)); assert!(me.start > prev.start); weight += prev.duration; } else { assert_eq!(me.prev, None); } assert_eq!(me.weight, weight); if let Some(ref tags) = me.tags { let duration = tags.iter().fold(0, |i, (_id, duration)| { i + duration }); /* * This is technically a more vigorous assertion than we can * make: we actually allow for partial tagging in that not * all states must by tagged all of the time. For the moment, * though, we assert that if any states have been tagged, all * have been. */ assert_eq!(duration, me.duration); } } } #[cfg(test)] fn subsume_apply_and_verify(&mut self, victim: u64) -> Vec<(u64, u64, Option)> { println!("=== Subsuming {}", victim); self.print(&format!("Before subsuming {}", victim)); self.verify(); let tup = self.subsume(victim); println!("Weight delta from subsuming {}: {:?}", victim, tup); self.print(&format!("After subsuming {}, before applying", victim)); let updates = self.apply(tup); self.print(&format!("After subsuming {}, after applying", victim)); self.verify(); updates } } enum Ingest { Success, EndOfFile, } fn try_parse<'de, T>(content: &mut &'de str) -> Result, serde_json::Error> where T: serde::Deserialize<'de> { let mut de = serde_json::Deserializer::from_str(*content).into_iter(); match de.next() { Some(Ok(value)) => { *content = &content[de.byte_offset()..]; Ok(Some(value)) } Some(Err(err)) => Err(err), None => Ok(None), } } fn try_parse_raw<'de, T>(content: &mut &'de str) -> Result, serde_json::Error> where T: serde::Deserialize<'de> { let mut de = serde_json::Deserializer::from_str(*content).into_iter(); let offset = de.byte_offset(); match de.next() { Some(Ok(value)) => { let v: serde_json::Value = serde_json::from_str(&content[offset..de.byte_offset()])?; *content = &content[de.byte_offset()..]; Ok(Some((value, v))) } Some(Err(err)) => Err(err), None => Ok(None), } } fn line_number(mmap: &[u8], byte_offset: usize) -> usize { let mut nls = mmap[..byte_offset].iter().filter(|&&b| b == b'\n').count(); /* * We report the line number of the first non-whitespace character after * byte_offset. */ for b in mmap[byte_offset..].iter() { if *b == b'\n' { nls += 1; } if !((*b as char).is_whitespace()) { break; } } nls + 1 } /* * The time value is written in the input as a JSON string containing a number. * Deserialize just the number here without allocating memory for a String. */ fn datum_time_from_string<'de, D>(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s: &str = serde::Deserialize::deserialize(deserializer)?; match u64::from_str(s) { Ok(time) => Ok(time), Err(_) => Err(serde::de::Error::custom("illegal time value")), } } impl Statemap { pub fn new(config: &Config) -> Self { Statemap { config: *config, nrecs: 0, nevents: 0, entities: HashMap::new(), states: Vec::new(), byid: Vec::new(), byweight: BTreeSet::new(), metadata: None, tags: HashMap::new(), begin: 0, end: 0, last: 0, } } fn err(&self, msg: &str) -> Result> { Err(Box::new(StatemapError::new(msg))) } fn entity_lookup(&mut self, name: &str) -> &mut StatemapEntity { /* * The lack of non-lexical lifetimes causes this code to be a bit * gnarlier than it should really have to be. */ if self.entities.contains_key(name) { return match self.entities.get_mut(name) { Some(entity) => { entity }, None => unreachable!() }; } let entity = StatemapEntity::new(name, self.byid.len()); self.byid.push(name.to_string()); self.entities.insert(name.to_string(), entity); self.entities.get_mut(name).unwrap() } fn tag_lookup(&mut self, state: u32, tagr: &Option) -> Option { if self.config.notags { return None; } match *tagr { Some(ref tag) => { let id; match self.tags.get(&(state, tag.to_string())) { Some(( _value, idr)) => { return Some(*idr); }, None => { id = self.tags.len(); } } let value = json!({ "state": state, "tag": tag.to_string() }); self.tags.insert((state, tag.to_string()), (value, id)); Some(id) }, None => None } } /* * Takes a vector of updates to apply to our byweight tree as well as a * template rectangle weight and applies the updates. */ fn apply(&mut self, updates: Vec<(u64, u64, Option)>, rweight: &mut StatemapRectWeight) { for i in 0..updates.len() { rweight.start = updates[i].0; rweight.weight = updates[i].1; self.byweight.remove(rweight); match updates[i].2 { Some(delta) => { rweight.weight += delta; self.byweight.insert(*rweight); } None => {} } } } /* * Subsumes the rectangle of least weight, applies the deltas to the * entity corresponding to that rectangle, and then applies the * resulting rectangle weight updates. */ fn trim(&mut self) { let mut remove: StatemapRectWeight; let updates; remove = *self.byweight.iter().next().unwrap(); self.byweight.remove(&remove); /* * We need a scope here to help the compiler out with respect to * our use of entity. */ { let name = &self.byid[remove.entity]; let entity = self.entities.get_mut(name).unwrap(); if entity.rects.len() == 1 { /* * If this entity only has one rectangle, than there is * nothing to subsume; we simply return. (This weight has * already been removed, so we won't find it again until * another rectangle is added for this entity.) */ return; } let deltas = entity.subsume(remove.start); updates = entity.apply(deltas); } self.apply(updates, &mut remove); } #[must_use] fn sort(&self, sortby: Option) -> Vec { let mut v: Vec<(u64, &String, usize)>; let values = self.entities.values(); match sortby { None => { v = values.map(|e| (0, &e.name, e.id)).collect(); }, Some(state) => { v = values.map(|e| { let ttl = e.rects.values().fold(0, |i, r| { i + r.borrow().states[state] }); (ttl, &e.name, e.id) }).collect(); } } v.sort_by(|&a, &b| { let result = b.0.cmp(&a.0); if result == cmp::Ordering::Equal { natord::compare(a.1, b.1) } else { result } }); v.iter().map(|e| e.2).collect() } /* * Return the total time spent across all entities and all rectangles * in a particular state, for purposes of assigning a weight to the * statemap itself. */ fn weight(&self, state: usize) -> u64 { self.entities.values().fold(0, |ttl, e| { ttl + e.rects.values().fold(0, |i, r| { i + r.borrow().states[state] }) }) } #[cfg(test)] fn verify(&self) { /* * First, verify each of the entities. */ for entity in self.entities.values() { entity.verify(); } /* * Verify that each rectangle in each entity can be found in our * byweight set -- and that the weights match. */ for entity in self.entities.values() { for cell in entity.rects.values() { let rect = cell.borrow(); let rweight = StatemapRectWeight { entity: entity.id, weight: rect.weight, start: rect.start }; assert!(self.byweight.contains(&rweight) || entity.rects.len() == 1 || Some(rect.start) == entity.last || rect.next == entity.last); } } let mut present = HashSet::new(); /* * Verify that each entity is valid that each entity/start tuple is * present exactly once. */ for rweight in self.byweight.iter() { let name = &self.byid[rweight.entity]; let tup = (rweight.entity, rweight.start); assert!(self.entities.get(name).is_some()); let entity = self.entities.get(name).unwrap(); assert!(entity.rects.get(&rweight.start).is_some()); assert!(!present.contains(&tup)); present.insert(tup); } } #[cfg(test)] fn subsume_apply_and_verify(&mut self, what: &str, victim: u64) { let id: usize; let mut weight: Option = None; let updates; { let entity = self.entity_lookup(what); updates = entity.subsume_apply_and_verify(victim); id = entity.id; } /* * Before we verify, remove the victim -- if it wasn't actually * to be removed, we'll add it back when we apply the updates. */ for rweight in self.byweight.iter() { if rweight.entity == id && rweight.start == victim { assert!(weight.is_none()); weight = Some(rweight.weight); } } assert!(weight.is_some()); let mut rweight = StatemapRectWeight { entity: id, weight: 0, start: 0 }; self.apply(updates, &mut rweight); self.print(&format!("After subsuming {} from {}", victim, what)); self.verify(); } #[cfg(test)] fn print(&self, header: &str) { println!("{}: by weight: {:?}", header, self.byweight); for entity in self.entities.values() { entity.print(header); } println!(""); } #[cfg(test)] fn get_rects(&self, entity: &str) -> Vec<(u64, u64, Vec)> { let mut rval: Vec<(u64, u64, Vec)>; let e = self.entities.get(entity); match e { Some(entity) => { rval = entity.rects.values().map(|r| { let rect = r.borrow(); (rect.start, rect.duration, rect.states.clone()) }).collect(); rval.sort(); }, None => { rval = vec![]; } } rval } /* * Ingest and advance `payload` past the metadata JSON object. */ fn ingest_metadata(&mut self, payload: &mut &str) -> Result<(), Box> { let metadata: StatemapInputMetadata = match try_parse(payload)? { None => return self.err("missing metadata payload"), Some(metadata) => metadata, }; let nstates = metadata.states.len(); let mut states: Vec> = vec![None; nstates]; if metadata.start.len() != 2 { return self.err(concat!("\"start\" property must be a ", "two element array")); } for (key, value) in &metadata.states { let ndx = value.value; if ndx >= nstates { let errmsg = format!(concat!("state \"{}\" has value ({}) ", "that exceeds maximum allowed value ({})"), key, ndx, nstates - 1); return self.err(&errmsg); } if ndx < states.len() && states[ndx].is_some() { let errmsg = format!(concat!("state \"{}\" has value ", "({}) that conflicts with state \"{}\""), key, ndx, states[ndx].as_ref().unwrap().name); return self.err(&errmsg); } states[ndx] = Some(StatemapState { name: key.to_string(), value: ndx, color: match value.color { Some(ref str) => { Some(str.to_string()) }, None => { None } } }); } assert_eq!(self.states.len(), 0); /* * We have verified our states; now pull them into our array. */ for _i in 0..nstates { self.states.push(states.remove(0).unwrap()); } self.metadata = Some(metadata); Ok(()) } fn ingest_end(&mut self) { assert!(!self.config.abstime); if self.config.end < 0 { return; } let mut end = self.last; let begin = self.config.begin; /* * If we've been given an ending time and it's less than the last * rectangle for which we have state, we'll use that. */ if self.config.end != 0 && self.config.end < end as i64 { end = self.config.end as u64; } let nstates = self.states.len() as u32; for entity in self.entities.values_mut() { match entity.start { Some(start) if start < end => { /* * If our start time is less than our begin time then * this entity must be in a single state for our entire * specified time -- and we move our start time up to our * begin time (and assert that we have no rectangles). */ if begin != 0 && (start as i64) < begin { assert!(entity.rects.is_empty()); entity.start = Some(begin as u64); } /* * We are adding a rectangle, but because we are now done * with ingestion, we are not updating the rectangle weight * tree and we are not going to subsume any rectangles; we * can safely ignore the return value. */ entity.newrect(end, nstates); /* * Even though we expect no other ingestion, we set our * last to allow for state to be verified. */ entity.last = entity.start; }, _ => {} } } let metadata = self.metadata.as_ref().unwrap(); let start = (metadata.start[0] * 1_000_000_000) + metadata.start[1]; self.begin = (self.config.begin + start as i64) as u64; self.end = cmp::max(end, self.config.end as u64) + start; } /* * Ingest and advance `payload` past one JSON object datum. */ fn ingest_datum(&mut self, payload: &mut &str) -> Result> { match try_parse::(payload) { Ok(None) => return Ok(Ingest::EndOfFile), Ok(Some(datum)) => { let time: u64 = datum.time; let nstates: u32 = self.states.len() as u32; self.last = time; /* * If the time of this datum is after our specified end time, * we have nothing further to do to process it. */ if self.config.end != 0 && time as i64 > self.config.end { return Ok(Ingest::Success); } if datum.state >= nstates { return self.err("illegal state value"); } let begin = self.config.begin; let mut errmsg: Option = None; let mut insert: Option = None; let mut update: Option<(StatemapRectWeight, u64)> = None; let tag = self.tag_lookup(datum.state, &datum.tag); /* * We are going to do a lookup of our entity, but this will * cause us to lose our reference on self (mutable or * otherwise) -- which we need to fully record any error. To * implement this absent non-lexical lifetimes, we put the * entity in a lexical scope implemented with "loop" so we * can break out of it on an error condition. */ loop { let name = &datum.entity; let entity = self.entity_lookup(name); match entity.start { Some(start) => { if time < start { errmsg = Some(format!(concat!("time {} is out", " of order with respect to prior time {}"), time, start)); break; } if (time as i64) > begin { /* * We can now create a new rectangle for this * entity's past state. */ if begin > 0 && start < (begin as u64) { entity.start = Some(begin as u64); } let rval = entity.newrect(time, nstates); entity.last = entity.start; match rval.0 { Some(rect) => { update = Some((StatemapRectWeight { weight: rect.1, start: rect.0, entity: entity.id }, rect.2)); } None => {} } insert = Some(StatemapRectWeight { weight: (rval.1).1, start: (rval.1).0, entity: entity.id }); } } None => {} } entity.start = Some(time); entity.state = Some(datum.state); entity.tag = tag; break; } if errmsg.is_some() { return self.err(&errmsg.unwrap()); } if update.is_some() { let mut rweight = update.unwrap().0; self.byweight.remove(&rweight); rweight.weight = update.unwrap().1; self.byweight.insert(rweight); } if insert.is_some() { self.byweight.insert(insert.unwrap()); } return Ok(Ingest::Success); } Err(_) => {} } match try_parse::(payload) { Ok(None) => return Ok(Ingest::EndOfFile), Ok(Some(datum)) => { let entity = self.entity_lookup(&datum.entity); entity.description = Some(datum.description.to_string()); return Ok(Ingest::Success); } Err(_) => {} } match try_parse::(payload) { Ok(None) => return Ok(Ingest::EndOfFile), Ok(Some(_datum)) => { /* * Right now, we don't do anything with events -- but the * intent is to be able to render these in the statemap, so * we also don't reject them. */ self.nevents += 1; return Ok(Ingest::Success); } Err(_) => {} } match try_parse_raw::(payload) { Ok(None) => return Ok(Ingest::EndOfFile), Ok(Some((datum, value))) => { if self.config.notags { return Ok(Ingest::Success); } /* * We allow tags to be redefined, so we need to first lookup * our tag to see if it exists -- and if it does, we need * to use the existing ID. */ let id; match self.tags.get(&(datum.state, datum.tag.to_string())) { Some((_value, idr)) => { id = *idr } None => { id = self.tags.len() } }; self.tags.insert((datum.state, datum.tag), (value, id)); return Ok(Ingest::Success); } Err(_) => {} } self.err("unrecognized payload") } pub fn ingest(&mut self, filename: &str) -> Result<(), Box> { let file = File::open(filename)?; let mut nrecs = 0; /* * Unsafe because Rust cannot enforce that the underlying data on * filesystem is not mutated while our program contains a &[u8] * reference to it. Mutating the file would result in undefined * behavior. */ let mmap = unsafe { MmapOptions::new().map(&file)? }; let mut contents = str::from_utf8(&mmap[..])?; let len = contents.len(); self.ingest_metadata(&mut contents)?; /* * If our time was presented as absolute time, we will now convert it * to be relative to our (now known) start time. */ if self.config.abstime { let metadata = self.metadata.as_ref().unwrap(); let start = (metadata.start[0] * 1_000_000_000 + metadata.start[1]) as i64; self.config.begin -= start; self.config.end -= start; self.config.abstime = false; } /* * Now rip through our data pulling out concatenated JSON payloads. */ loop { match self.ingest_datum(&mut contents) { Ok(Ingest::Success) => nrecs += 1, Ok(Ingest::EndOfFile) => break, Err(err) => { /* * Lazily compute the line number for our error message. */ let remaining_len = contents.len(); let byte_offset = len - remaining_len; let line = line_number(&mmap, byte_offset); let message = format!("illegal datum on line {}: {}", line, err); return self.err(&message); } } while self.byweight.len() >= self.config.maxrect as usize { self.trim(); } } self.ingest_end(); eprintln!("{}: {} records processed, {} rectangles", Path::new(filename).file_name().unwrap().to_string_lossy(), nrecs, self.byweight.len()); Ok(()) } pub fn timebounds(&self) -> (u64, u64) { (self.begin, self.end) } fn output_defs(&self) { /* * Provide an "entities" member that has the descriptions for each * entity, if they have one. Yes, this is a little goofy -- it * would make much more sense to have a "descriptions" member that * consists of strings named by entity -- but we're doing this for * the sake of compatibility with the legacy implementation, however * dubious.. */ println!("entities: {{"); let mut comma = ""; for entity in self.entities.values() { let val = match entity.description { Some(ref description) => { format!("description: \"{}\"", description) } _ => { "".to_string() } }; println!(" {} \"{}\": {{ {} }}", comma, entity.name, val); comma = ","; } println!("}}"); if self.tags.len() > 0 { /* * Pull our tags into a Vec so we can sort them and emit them in * array order. */ let mut tags: Vec<(usize, u32, &str)> = vec![]; for ((state, tag), (_value, id)) in self.tags.iter() { tags.push((*id, *state, tag)); } tags.sort_unstable(); println!(", tags: ["); for i in 0..tags.len() { let (value, id) = self.tags.get(&(tags[i].1, tags[i].2.to_string())).unwrap(); assert_eq!(i, *id); println!("{}{}", serde_json::to_string_pretty(value).unwrap(), if i < tags.len() - 1 { "," } else { "" }); } println!("]"); } } fn output_svg(&self, id: usize, config: &StatemapSVGConfig, globals: &StatemapSVGGlobals, colors: &Vec) -> Result<(), Box> { let output_data = |data: &HashMap<&String, Vec>| { println!("\"data\": {{ "); let mut comma = ""; for entity in data.keys() { println!("{}\"{}\": [", comma, entity); let datum = data.get(entity).unwrap(); if datum.len() > 0 { for i in 0..datum.len() - 1 { println!("{},", datum[i]); } println!("{}", datum[datum.len() - 1]); } println!("]"); comma = ","; } println!(r##"}},"##); }; let metadata = match self.metadata { Some(ref metadata) => { metadata } _ => { return self.err("metadata not found in data stream"); } }; /* * Sort our entities, by whatever criteria has been specified. */ let sort = match config.sortby { None => None, Some(ref sortby) => { if metadata.states.contains_key(sortby) { Some(metadata.states.get(sortby).unwrap().value) } else { if sortby == "entity" { /* * A state of "entity" denotes that we should sort * by entity name. */ None } else { return self.err(&format!(concat!("cannot sort by ", "state \"{}\": no such state"), sortby)); } } } }; let entities = self.sort(sort); println!(r##""##, id); let mut y = 0; let mut data = HashMap::new(); let mut title = metadata.title.clone(); if let Some(ref host) = metadata.host { title.push_str(&format!(" on {}", host)); } let locals = StatemapSVGLocals { offset: self.config.begin - globals.begin, states: &self.states, entityKind: match metadata.entityKind { Some(ref kind) => { kind } None => { "Entity" } }, title: title, }; for e in entities { let entity = self.entities.get(self.byid.get(e).unwrap()).unwrap(); data.insert(&entity.name, entity.output_svg(id, self.config.begin, config, globals, &locals, &colors, y)); y += config.stripHeight; } println!(""); /* * Finally, output our element in the global statemaps array. */ println!(""); println!(r##""##); Ok(()) } } impl<'a> StatemapSVG<'a> { pub fn new(config: &'a StatemapSVGConfig) -> Self { StatemapSVG { config: config } } fn output_defs(&self, globals: &StatemapSVGGlobals) { println!(""); println!("", lib); /* * Next up: CSS. */ let css = include_str!("statemap-svg.css"); println!("", css); /* * And now other definitions. */ let defs = include_str!("statemap-svg.defs"); println!("{}", defs); println!(""); } fn title(&self, statemaps: &Vec) -> String { /* * A little helper routine to generate an Oxford comma-separated * list. */ let oxford = |v: &Vec| { let map: HashSet<_> = v.iter().collect(); if map.len() == 1 { v[0].clone() } else if v.len() == 2 { v.join(" and ") } else { (&v[0..v.len() - 1]).join(", ") + ", and " + &v[v.len() - 1] } }; /* * If we have "statemap" anywhere in the title of the first statemap, * we assume it's a legacy title and just use that. */ let metadata = statemaps[0].metadata.as_ref().unwrap(); if metadata.title.find("tatemap").is_some() { return metadata.title.clone(); } /* * Gather our titles. */ let titles = statemaps.iter() .filter_map(|s| s.metadata.as_ref()) .map(|m| m.title.to_string()) .collect::>(); let mut title = vec!["Statemap of".to_string(), oxford(&titles), "activity".to_string()]; let hosts = statemaps.iter() .filter_map(|s| s.metadata.as_ref()) .filter_map(|m| m.host.as_ref()) .map(|r| r.to_string()) .collect::>(); if hosts.len() > 0 { title.push("on".to_string()); if hosts.iter().collect::>().len() > 5 { title.push(format!("{} hosts", hosts.len())); } else { title.push(oxford(&hosts)); } } title.join(" ") } pub fn output(&self, statemaps: &Vec) -> Result<(), Box> { struct Props { x: u32, y: u32, height: u32, width: u32, lheight: u32, spacing: u32 }; let base = &statemaps[0]; let output_controls = |props: &Props| { let width = props.width / 4; let mut x = 0; let y = 0; let icons = vec![ (include_str!("./icons/arrow-left-l.svg"), "panclick(50, 0)"), (include_str!("./icons/zoom-in.svg"), "zoomclick(1.25)"), (include_str!("./icons/zoom-out.svg"), "zoomclick(0.8)"), (include_str!("./icons/arrow-right-l.svg"), "panclick(-50, 0)") ]; println!(r##""##, props.x, props.y, props.width, props.height); for i in 0..icons.len() { println!(r##"{}"##, x, y, width, width, icons[i].1, width, width, icons[i].1, icons[i].0); x += width; } println!(""); }; let output_legend = |statemap: &Statemap, id: usize, props: &mut Props, colors: &Vec| { let x = props.x; let mut y = props.y; let height = props.lheight; let width = props.width; for state in 0..statemap.states.len() { println!(concat!(r##""##), x, y, width, height, id, state, id, state, colors[state]); y += height + props.spacing; println!(concat!(r##"{}"##), x + (width / 2), y, statemap.states[state].name); y += props.spacing; } props.y = y; }; let output_tagbox = || { if !base.config.notags { println!(r##""##); println!(r##""##); } }; let metadata = match base.metadata { Some(ref metadata) => { metadata } _ => { return base.err("metadata not found in data stream"); } }; #[allow(non_snake_case)] let timeWidth = base.entities.values().fold(base.config.end, |latest, e| { match e.start { Some(start) => cmp::max(latest, start as i64), None => latest } }) - base.config.begin; assert!(timeWidth >= 0); let lmargin = self.config.legendWidth; let tmargin = 60; let rmargin = self.config.tagWidth; let smargin = self.config.stripHeight; let height: u32; let stacked = true; if stacked || statemaps.len() == 1 { let nentities = statemaps.iter().fold(0, |total, statemap| { total + statemap.entities.len() }); height = nentities as u32 * self.config.stripHeight + tmargin + ((statemaps.len() as u32) - 1) * smargin; } else { panic!("tabbed statemaps not yet supported"); } let width = self.config.stripWidth + lmargin + rmargin; let mut props = Props { x: 20, y: tmargin, height: 45, width: lmargin, lheight: 15, spacing: 10 }; let mut sharedlegend = true; let mut lheight = tmargin + props.height; /* * We need to add in our legend height, but to determine this, we * need to see to what degree we will be sharing legends. */ for i in 0..statemaps.len() { if i == 0 || statemaps[i].states != statemaps[i - 1].states { lheight += statemaps[i].states.len() as u32 * (props.lheight + (props.spacing * 2)); if i > 0 { lheight += props.spacing * 2; sharedlegend = false; } } } let globals = StatemapSVGGlobals { begin: base.config.begin, end: base.config.end, pixelWidth: self.config.stripWidth, pixelHeight: height - tmargin, totalHeight: cmp::max(height, lheight), timeWidth: timeWidth as u64, lmargin: lmargin, tmargin: tmargin, smargin: smargin, entityPrefix: "statemap-entity-".to_string(), states: &base.states, start: &metadata.start, entityKind: match metadata.entityKind { Some(ref kind) => { kind } None => { "Entity" } } }; /* * Make sure that all of our colors are valid. */ let mut colors: Vec> = vec![]; for i in 0..statemaps.len() { for j in 0..statemaps[i].states.len() { colors.push(vec![]); match statemaps[i].states[j].color { Some(ref name) => { match StatemapColor::from_str(name) { Ok(color) => colors[i].push(color), Err(_err) => { return base.err(&format!(concat!("illegal ", "color \"{}\" for state \"{}\""), name, statemaps[i].states[j].name)); } } } None => colors[i].push(StatemapColor::random()) } } } let sorted: Vec; match self.config.stacksortby { None => { sorted = (0..statemaps.len()).collect(); } Some(ref stacksortby) => { /* * If we aren't all sharing a legend, this doesn't make sense. */ if !sharedlegend { return base.err("can only stack sort like statemaps"); } if !metadata.states.contains_key(stacksortby) { return base.err(&format!(concat!("unknown stack sorting ", "state \"{}\""), stacksortby)); } let sort = metadata.states.get(stacksortby).unwrap().value; let mut weights = statemaps.iter() .map(|s| s.weight(sort)) .enumerate() .collect::>(); weights.sort_by(|&(_, l), &(_, r)| r.cmp(&l)); sorted = weights.iter().map(|&(e, _)| e).collect(); } } println!(r##" "##, width, globals.totalHeight); self.output_defs(&globals); let mut y = tmargin; for i in 0..statemaps.len() { let statemap = &statemaps[sorted[i]]; let height = statemap.entities.len() as u32 * self.config.stripHeight; println!(r##""##, lmargin, y, globals.pixelWidth, height); /* * First, we drop down a background rectangle as big as our SVG. * This color will be changed dynamically to be a highlight color, * and then rectangles can be made transparent to become * highlighted. */ println!(concat!(r##""##), globals.pixelWidth, height, self.config.background, i); statemap.output_svg(i, &self.config, &globals, &colors[i])?; println!(""); /* * The border around this statemap. */ println!(r##""##, lmargin, y, lmargin + globals.pixelWidth, y, lmargin + globals.pixelWidth, y + height, lmargin, y + height); y += height + smargin; } println!(concat!(r##"{}"##), lmargin + (globals.pixelWidth / 2), 16, self.title(statemaps)); println!(concat!(r##""##), lmargin + (globals.pixelWidth / 2), 34); println!(r##""##); props.width -= (2 * props.x) + 10; output_controls(&props); props.y += props.height; for i in 0..statemaps.len() { if i == 0 || statemaps[i].states != statemaps[i - 1].states { output_legend(&statemaps[i], i, &mut props, &colors[i]); } if !sharedlegend { props.y += props.spacing * 2; } } output_tagbox(); println!(""); Ok(()) } } #[cfg(test)] mod tests { use super::*; use std::env; use std::process; use std::fs; use std::io::Write; fn metadata(config: Option<&Config>, mut metadata: &str) -> Statemap { let mut statemap; match config { Some(config) => { statemap = Statemap::new(&config); }, None => { let config: Config = Default::default(); statemap = Statemap::new(&config); } } match statemap.ingest_metadata(&mut metadata) { Err(err) => { panic!("metadata incorrectly failed: {:?}", err); } Ok(_) => { statemap } } } fn minimal(config: Option<&Config>) -> Statemap { metadata(config, r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": 0 }, "one": {"value": 1 } } }"##) } fn data(config: Option<&Config>, data: Vec<&str>) -> Statemap { let mut statemap = minimal(config); for mut datum in data { match statemap.ingest_datum(&mut datum) { Err(err) => { panic!("data incorrectly failed: {:?}", err); } Ok(_) => {} } } statemap.ingest_end(); statemap } fn bad_metadata(mut metadata: &str, expected: &str) { let config: Config = Default::default(); let mut statemap = Statemap::new(&config); match statemap.ingest_metadata(&mut metadata) { Err(err) => { let errmsg = format!("{}", err); if errmsg.find(expected).is_none() { panic!("error ('{}') did not contain '{}' as expected", errmsg, expected); } }, Ok(_) => { panic!("bad metadata succeeded!"); } } } fn bad_datum(operand: Option, mut datum: &str, expected: &str) { let mut statemap = match operand { Some(statemap) => statemap, None => { metadata(None, r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": 0 }, "one": {"value": 1 } } }"##) } }; match statemap.ingest_datum(&mut datum) { Err(err) => { let errmsg = format!("{}", err); if errmsg.find(expected).is_none() { panic!("error ('{}') did not contain '{}' as expected", errmsg, expected); } }, Ok(_) => { panic!("bad datum succeeded!"); } } } fn statemap_ingest(statemap: &mut Statemap, raw: &str) -> Result<(), Box> { let mut path = env::temp_dir(); path.push(format!("statemap.test.{}.{:p}", process::id(), statemap)); let filename = path.to_str().unwrap(); let mut file = File::create(filename)?; file.write_all(raw.as_bytes())?; let result = statemap.ingest(filename); fs::remove_file(filename)?; result } fn bad_statemap(raw: &str, expected: &str) { let config: Config = Default::default(); let mut statemap = Statemap::new(&config); match statemap_ingest(&mut statemap, raw) { Err(err) => { let errmsg = format!("{}\n", err); if errmsg.find(expected).is_none() { panic!("error ('{}') did not contain '{}' as expected", errmsg, expected); } }, Ok(_) => { panic!("bad statemap succeeded!"); } } } macro_rules! bad_statemap { ($what:expr) => ({ bad_statemap(include_str!(concat!("../tst/tst.", $what, ".in")), include_str!(concat!("../tst/tst.", $what, ".err"))); }); } fn good_statemap(config: &Config, raw: &str) -> Statemap { let mut statemap = Statemap::new(&config); match statemap_ingest(&mut statemap, raw) { Err(err) => { panic!("statemap failed: {}", err); }, Ok(_) => { statemap } } } macro_rules! good_statemap { ($what:expr) => ({ let mut config: Config = Default::default(); config.notags = false; good_statemap(&config, include_str!(concat!("../tst/tst.", $what, ".in"))) }); ($what:expr, $conf:expr) => ({ good_statemap($conf, include_str!(concat!("../tst/tst.", $what, ".in"))) }); } #[test] fn good_minimal() { metadata(None, r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": 0 } } }"##); } #[test] fn bad_title_missing() { bad_metadata(r##"{ "start": [ 0, 0 ], "states": { "zero": {"value": 0 } } }"##, "missing field `title`"); } #[test] fn bad_start_missing() { bad_metadata(r##"{ "title": "Foo", "states": { "zero": {"value": 0 } } }"##, "missing field `start`"); } #[test] fn bad_start_badval() { bad_metadata(r##"{ "start": [ -1, 0 ], "title": "Foo", "states": { "zero": {"value": 0 } } }"##, "invalid value: integer `-1`"); } #[test] fn bad_start_tooshort() { bad_metadata(r##"{ "start": [ 0 ], "title": "Foo", "states": { "zero": {"value": 0 } } }"##, "\"start\" property must be a two element array"); } #[test] fn bad_start_toolong() { bad_metadata(r##"{ "start": [ 0, 0, 3 ], "title": "Foo", "states": { "zero": {"value": 0 } } }"##, "\"start\" property must be a two element array"); } #[test] fn bad_states_missing() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo" }"##, "missing field `states`"); } #[test] fn bad_states_badmap() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo", "states": 123 }"##, "expected a map"); } #[test] fn bad_states_value_missing() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {} } }"##, "missing field `value`"); } #[test] fn bad_states_value_bad() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": -1 } } }"##, "invalid value: integer `-1`"); } #[test] fn bad_states_value_skipped1() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": 0 }, "one": {"value": 2 } } }"##, "state \"one\" has value (2) that exceeds maximum"); } #[test] fn bad_states_value_toohigh() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": 1 }, "one": {"value": 2 } } }"##, "state \"one\" has value (2) that exceeds maximum"); } #[test] fn bad_states_value_duplicate() { bad_metadata(r##"{ "start": [ 0, 0 ], "title": "Foo", "states": { "zero": {"value": 1 }, "one": {"value": 1 } } }"##, "has value (1) that conflicts"); } #[test] fn bad_line_basic() { bad_statemap!("bad_line_basic"); } #[test] fn bad_line_whitespace() { bad_statemap!("bad_line_whitespace"); } #[test] fn bad_line_newline() { bad_statemap!("bad_line_newline"); } #[test] fn basic() { let statemap = metadata(None, r##"{ "start": [ 1528417173, 255882937 ], "title": "Foo", "host": "HA8S7MRD2", "entityKind": "Process", "states": { "on-cpu": {"value": 0, "color": "#2e9107" }, "off-cpu-waiting": {"value": 1, "color": "#f9f9f9" }, "off-cpu-semop": {"value": 2, "color": "#FF5733" }, "off-cpu-blocked": {"value": 3, "color": "#C70039" }, "off-cpu-zfs-read": {"value": 4, "color": "#FFC300" }, "off-cpu-zfs-write": {"value": 5, "color": "#338AFF" }, "off-cpu-zil-commit": {"value": 6, "color": "#66FFCC" }, "off-cpu-tx-delay": {"value": 7, "color": "#e1ff00" }, "off-cpu-dead": {"value": 8, "color": "#E0E0E0" } } }"##); assert_eq!(statemap.states.len(), 9); assert_eq!(statemap.states[0].name, "on-cpu"); assert_eq!(statemap.states[0].color, Some("#2e9107".to_string())); assert_eq!(statemap.states[1].name, "off-cpu-waiting"); assert_eq!(statemap.states[1].color, Some("#f9f9f9".to_string())); assert_eq!(statemap.states[8].name, "off-cpu-dead"); } #[test] fn basic_datum() { let mut _statemap = data(None, vec![ r##"{ "time": "156683", "entity": "foo", "state": 0 }"## ]); } #[test] fn basic_description() { let mut statemap = data(None, vec![ r##"{ "time": "156683", "entity": "foo", "state": 0 }"##, r##"{ "entity": "foo", "description": "This is a foo!" }"## ]); assert_eq!(statemap.entity_lookup("foo").description, Some("This is a foo!".to_string())); } #[test] fn bad_datum_badtime() { bad_datum(None, r##" { "time": 156683, "entity": "foo", "state": 0 } "##, "unrecognized payload"); } #[test] fn bad_datum_badtime_float() { bad_datum(None, r##" { "time": "156683.12", "entity": "foo", "state": 0 } "##, "unrecognized payload"); } #[test] fn bad_datum_nostate() { bad_datum(None, r##" { "time": "156683", "entity": "foo" } "##, "unrecognized payload"); } #[test] fn bad_datum_badstate() { bad_datum(None, r##" { "time": "156683", "entity": "foo", "state": 200 } "##, "illegal state value"); } #[test] fn bad_datum_backwards() { let statemap = data(None, vec![ r##"{ "time": "156683", "entity": "foo", "state": 0 }"## ]); bad_datum(Some(statemap), r##" { "time": "156682", "entity": "foo", "state": 1 } "##, "out of order with respect to prior time"); } #[test] fn basic_data() { let statemap = data(None, vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.verify(); } #[test] fn subsume() { let mut statemap = data(None, vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.print("Initial load"); statemap.verify(); statemap.subsume_apply_and_verify("foo", 100000); statemap.subsume_apply_and_verify("foo", 300000); statemap.subsume_apply_and_verify("foo", 100000); } #[test] fn subsume_right() { let mut statemap = data(None, vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.print("Initial load"); statemap.verify(); statemap.subsume_apply_and_verify("foo", 500000); statemap.subsume_apply_and_verify("foo", 400000); statemap.subsume_apply_and_verify("foo", 300000); statemap.subsume_apply_and_verify("foo", 200000); } #[test] fn subsume_middle() { let mut statemap = data(None, vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.print("Initial load"); statemap.verify(); statemap.subsume_apply_and_verify("foo", 300000); statemap.subsume_apply_and_verify("foo", 300000); statemap.subsume_apply_and_verify("foo", 200000); } #[test] fn subsume_tagged() { let mut statemap = data(None, vec![ r##"{ "time": "100", "entity": "foo", "state": 0, "tag": "a" }"##, r##"{ "time": "200", "entity": "foo", "state": 1, "tag": "b" }"##, r##"{ "time": "300", "entity": "foo", "state": 0, "tag": "c" }"##, r##"{ "time": "400", "entity": "foo", "state": 1, "tag": "b" }"##, r##"{ "time": "500", "entity": "foo", "state": 0, "tag": "a" }"##, r##"{ "time": "600", "entity": "foo", "state": 1, "tag": "b" }"## ]); statemap.print("Initial load"); statemap.verify(); statemap.subsume_apply_and_verify("foo", 100); statemap.subsume_apply_and_verify("foo", 300); statemap.subsume_apply_and_verify("foo", 100); } #[test] fn trim() { let mut statemap = data(None, vec![ r##"{ "time": "0", "entity": "foo", "state": 0 }"##, r##"{ "time": "100", "entity": "foo", "state": 1 }"##, r##"{ "time": "101", "entity": "foo", "state": 0 }"##, r##"{ "time": "104", "entity": "foo", "state": 1 }"##, r##"{ "time": "106", "entity": "foo", "state": 0 }"##, r##"{ "time": "206", "entity": "foo", "state": 1 }"##, r##"{ "time": "207", "entity": "foo", "state": 0 }"## ]); statemap.print("Initial"); statemap.trim(); statemap.verify(); statemap.print("After first trim"); statemap.trim(); statemap.verify(); statemap.print("After second trim"); statemap.trim(); statemap.verify(); statemap.print("After third trim"); } #[test] fn trim_insert() { let mut statemap = data(None, vec![ r##"{ "time": "0", "entity": "foo", "state": 0 }"##, r##"{ "time": "100", "entity": "foo", "state": 1 }"##, r##"{ "time": "101", "entity": "foo", "state": 0 }"##, r##"{ "time": "104", "entity": "foo", "state": 1 }"##, r##"{ "time": "106", "entity": "foo", "state": 0 }"##, r##"{ "time": "206", "entity": "foo", "state": 1 }"##, r##"{ "time": "207", "entity": "foo", "state": 0 }"## ]); statemap.print("Initial"); statemap.trim(); statemap.verify(); statemap.print("After first trim"); let mut datum = r##"{ "time": "210", "entity": "foo", "state": 1 }"##; assert!(statemap.ingest_datum(&mut datum).is_ok()); statemap.verify(); statemap.print("After insert"); statemap.trim(); statemap.verify(); statemap.print("After second trim"); } #[test] fn trim_multient() { let mut statemap = data(None, vec![ r##"{ "time": "0", "entity": "foo", "state": 0 }"##, r##"{ "time": "1000", "entity": "foo", "state": 1 }"##, r##"{ "time": "1010", "entity": "foo", "state": 0 }"##, r##"{ "time": "1040", "entity": "foo", "state": 1 }"##, r##"{ "time": "1060", "entity": "foo", "state": 0 }"##, r##"{ "time": "2060", "entity": "foo", "state": 1 }"##, r##"{ "time": "2070", "entity": "foo", "state": 0 }"##, r##"{ "time": "0", "entity": "bar", "state": 0 }"##, r##"{ "time": "10", "entity": "bar", "state": 1 }"##, ]); statemap.print("Initial"); statemap.trim(); statemap.verify(); statemap.print("After trim"); } #[test] fn data_begin_time() { let mut config: Config = Default::default(); config.begin = 200000; let statemap = data(Some(&config), vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.verify(); statemap.print("Begin at 200000"); let rects = statemap.get_rects("foo"); assert_eq!(rects.len(), 4); assert_eq!(rects[0].0, 200000); assert_eq!(rects[0].1, 300000 - 200000); } #[test] fn data_begin_time_later() { let mut config: Config = Default::default(); config.begin = 200001; let statemap = data(Some(&config), vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.verify(); statemap.print("Begin at 200001"); let rects = statemap.get_rects("foo"); assert_eq!(rects.len(), 4); assert_eq!(rects[0].0, 200001); assert_eq!(rects[0].1, 300000 - 200001); assert_eq!((rects[0].2)[0], 0); assert_eq!((rects[0].2)[1], 300000 - 200001); } #[test] fn data_begin_end_time() { let mut config: Config = Default::default(); config.begin = 250000; config.end = 310000; let statemap = data(Some(&config), vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.verify(); statemap.print("Begin at 250000, end at 310000"); let rects = statemap.get_rects("foo"); assert_eq!(rects.len(), 2); assert_eq!(rects[0].0, 250000); assert_eq!(rects[0].1, 250000 - 200000); assert_eq!((rects[0].2)[0], 0); assert_eq!((rects[0].2)[1], 250000 - 200000); assert_eq!(rects[1].0, 300000); assert_eq!(rects[1].1, 310000 - 300000); assert_eq!((rects[1].2)[0], 310000 - 300000); assert_eq!((rects[1].2)[1], 0); } #[test] fn data_wrapped_time() { let mut config: Config = Default::default(); config.begin = 250000; config.end = 260000; let statemap = data(Some(&config), vec![ r##"{ "time": "100000", "entity": "foo", "state": 0 }"##, r##"{ "time": "200000", "entity": "foo", "state": 1 }"##, r##"{ "time": "300000", "entity": "foo", "state": 0 }"##, r##"{ "time": "400000", "entity": "foo", "state": 1 }"##, r##"{ "time": "500000", "entity": "foo", "state": 0 }"##, r##"{ "time": "600000", "entity": "foo", "state": 1 }"## ]); statemap.verify(); statemap.print("Begin at 250000, end at 260000"); let rects = statemap.get_rects("foo"); assert_eq!(rects.len(), 1); assert_eq!(rects[0].0, 250000); assert_eq!(rects[0].1, 260000 - 250000); assert_eq!((rects[0].2)[0], 0); assert_eq!((rects[0].2)[1], 260000 - 250000); } #[test] fn color_named() { let colors = vec![ ("aliceblue", (240, 248, 255)), ("antiquewhite", (250, 235, 215)), ("aqua", (0, 255, 255)), ("aquamarine", (127, 255, 212)), ("azure", (240, 255, 255)), ("beige", (245, 245, 220)), ("bisque", (255, 228, 196)), ("black", (0, 0, 0)), ("blanchedalmond", (255, 235, 205)), ("blue", (0, 0, 255)), ("blueviolet", (138, 43, 226)), ("brown", (165, 42, 42)), ("burlywood", (222, 184, 135)), ("cadetblue", (95, 158, 160)), ("chartreuse", (127, 255, 0)), ("chocolate", (210, 105, 30)), ("coral", (255, 127, 80)), ("cornflowerblue", (100, 149, 237)), ("cornsilk", (255, 248, 220)), ("crimson", (220, 20, 60)), ("cyan", (0, 255, 255)), ("darkblue", (0, 0, 139)), ("darkcyan", (0, 139, 139)), ("darkgoldenrod", (184, 134, 11)), ("darkgray", (169, 169, 169)), ("darkgreen", (0, 100, 0)), ("darkgrey", (169, 169, 169)), ("darkkhaki", (189, 183, 107)), ("darkmagenta", (139, 0, 139)), ("darkolivegreen", (85, 107, 47)), ("darkorange", (255, 140, 0)), ("darkorchid", (153, 50, 204)), ("darkred", (139, 0, 0)), ("darksalmon", (233, 150, 122)), ("darkseagreen", (143, 188, 143)), ("darkslateblue", (72, 61, 139)), ("darkslategray", (47, 79, 79)), ("darkslategrey", (47, 79, 79)), ("darkturquoise", (0, 206, 209)), ("darkviolet", (148, 0, 211)), ("deeppink", (255, 20, 147)), ("deepskyblue", (0, 191, 255)), ("dimgray", (105, 105, 105)), ("dimgrey", (105, 105, 105)), ("dodgerblue", (30, 144, 255)), ("firebrick", (178, 34, 34)), ("floralwhite", (255, 250, 240)), ("forestgreen", (34, 139, 34)), ("fuchsia", (255, 0, 255)), ("gainsboro", (220, 220, 220)), ("ghostwhite", (248, 248, 255)), ("gold", (255, 215, 0)), ("goldenrod", (218, 165, 32)), ("gray", (128, 128, 128)), ("green", (0, 128, 0)), ("greenyellow", (173, 255, 47)), ("grey", (128, 128, 128)), ("honeydew", (240, 255, 240)), ("hotpink", (255, 105, 180)), ("indianred", (205, 92, 92)), ("indigo", (75, 0, 130)), ("ivory", (255, 255, 240)), ("khaki", (240, 230, 140)), ("lavender", (230, 230, 250)), ("lavenderblush", (255, 240, 245)), ("lawngreen", (124, 252, 0)), ("lemonchiffon", (255, 250, 205)), ("lightblue", (173, 216, 230)), ("lightcoral", (240, 128, 128)), ("lightcyan", (224, 255, 255)), ("lightgoldenrodyellow", (250, 250, 210)), ("lightgray", (211, 211, 211)), ("lightgreen", (144, 238, 144)), ("lightgrey", (211, 211, 211)), ("lightpink", (255, 182, 193)), ("lightsalmon", (255, 160, 122)), ("lightseagreen", (32, 178, 170)), ("lightskyblue", (135, 206, 250)), ("lightslategray", (119, 136, 153)), ("lightslategrey", (119, 136, 153)), ("lightsteelblue", (176, 196, 222)), ("lightyellow", (255, 255, 224)), ("lime", (0, 255, 0)), ("limegreen", (50, 205, 50)), ("linen", (250, 240, 230)), ("magenta", (255, 0, 255)), ("maroon", (128, 0, 0)), ("mediumaquamarine", (102, 205, 170)), ("mediumblue", (0, 0, 205)), ("mediumorchid", (186, 85, 211)), ("mediumpurple", (147, 112, 219)), ("mediumseagreen", (60, 179, 113)), ("mediumslateblue", (123, 104, 238)), ("mediumspringgreen", (0, 250, 154)), ("mediumturquoise", (72, 209, 204)), ("mediumvioletred", (199, 21, 133)), ("midnightblue", (25, 25, 112)), ("mintcream", (245, 255, 250)), ("mistyrose", (255, 228, 225)), ("moccasin", (255, 228, 181)), ("navajowhite", (255, 222, 173)), ("navy", (0, 0, 128)), ("oldlace", (253, 245, 230)), ("olive", (128, 128, 0)), ("olivedrab", (107, 142, 35)), ("orange", (255, 165, 0)), ("orangered", (255, 69, 0)), ("orchid", (218, 112, 214)), ("palegoldenrod", (238, 232, 170)), ("palegreen", (152, 251, 152)), ("paleturquoise", (175, 238, 238)), ("palevioletred", (219, 112, 147)), ("papayawhip", (255, 239, 213)), ("peachpuff", (255, 218, 185)), ("peru", (205, 133, 63)), ("pink", (255, 192, 203)), ("plum", (221, 160, 221)), ("powderblue", (176, 224, 230)), ("purple", (128, 0, 128)), ("rebeccapurple", (102, 51, 153)), ("red", (255, 0, 0)), ("rosybrown", (188, 143, 143)), ("royalblue", (65, 105, 225)), ("saddlebrown", (139, 69, 19)), ("salmon", (250, 128, 114)), ("sandybrown", (244, 164, 96)), ("seagreen", (46, 139, 87)), ("seashell", (255, 245, 238)), ("sienna", (160, 82, 45)), ("silver", (192, 192, 192)), ("skyblue", (135, 206, 235)), ("slateblue", (106, 90, 205)), ("slategray", (112, 128, 144)), ("slategrey", (112, 128, 144)), ("snow", (255, 250, 250)), ("springgreen", (0, 255, 127)), ("steelblue", (70, 130, 180)), ("tan", (210, 180, 140)), ("teal", (0, 128, 128)), ("thistle", (216, 191, 216)), ("tomato", (255, 99, 71)), ("turquoise", (64, 224, 208)), ("violet", (238, 130, 238)), ("wheat", (245, 222, 179)), ("white", (255, 255, 255)), ("whitesmoke", (245, 245, 245)), ("yellow", (255, 255, 0)), ("yellowgreen", (154, 205, 50)), ]; let notcolors = vec!["nixon", "yellowgreenybeeny", "#1234567", "1234567", "$123456", "#123456#" ]; for i in 0..notcolors.len() { match StatemapColor::from_str(notcolors[i]) { Ok(color) => { panic!("lookup of {} succeeded with {:?}!", notcolors[i], color); }, Err(err) => { println!("lookup of {} failed with {}", notcolors[i], err); } } } for i in 0..colors.len() { match StatemapColor::from_str(colors[i].0) { Ok(color) => { let out = format!("rgb({}, {}, {})", (colors[i].1).0, (colors[i].1).1, (colors[i].1).2); assert_eq!(out, color.to_string()); }, Err(err) => { panic!("lookup of {} failed with {}!", colors[i].0, err); } } } } #[test] fn color_mix() { let red = StatemapColor::from_str("red").unwrap(); let white = StatemapColor::from_str("white").unwrap(); let tests = vec![ (0.0, "rgb(255, 0, 0)"), (0.25, "rgb(255, 137, 137)"), (0.5, "rgb(255, 188, 188)"), (0.75, "rgb(255, 225, 225)"), (1.0, "rgb(255, 255, 255)"), ]; for i in 0..tests.len() { assert_eq!(red._mix(&white, tests[i].0).to_string(), tests[i].1); assert_eq!(red._mix(&white, tests[i].0).to_string(), white._mix(&red, 1.0 - tests[i].0).to_string()); } } #[test] fn color_mix_linear() { let color = StatemapColor::from_str("#2e9107").unwrap(); let other = StatemapColor::from_str("#f9f9f9").unwrap(); let ratio = 351500 as f64 / 840108 as f64; let mix = color._mix(&other, ratio as f32); println!("color={}, other={}, mix={}", color, other, mix); } #[test] fn color_mix_nonlinear() { let color = StatemapColor::from_str("#2e9107").unwrap(); let other = StatemapColor::from_str("#f9f9f9").unwrap(); let ratio = 351500 as f64 / 840108 as f64; let mix = color.mix_nonlinear(&other, ratio as f32); println!("color={}, other={}, mix={}", color, other, mix); } #[test] fn tag_basic() { let statemap = good_statemap!("tag_basic"); println!("{:?}", statemap.tags); statemap.verify(); } #[test] fn tag_redefined() { let statemap = good_statemap!("tag_redefined"); println!("{:?}", statemap.tags); statemap.verify(); } #[test] fn timebounds() { let statemap = good_statemap!("io"); let _timebounds = statemap.timebounds(); let mut config: Config = Default::default(); config.begin = 100000; let bounded = good_statemap!("io", &config); println!("{:?}", bounded.timebounds()); config.begin = -100000; config.end = 10000; let bounded = good_statemap!("io", &config); println!("{:?}", bounded.timebounds()); statemap.verify(); } #[test] fn weight() { let statemap = good_statemap!("io"); assert_eq!(statemap.weight(0), 737063); assert_eq!(statemap.weight(1), 2290450); assert_eq!(statemap.weight(2), 934399); assert_eq!(statemap.weight(3), 1082403); } } ================================================ FILE: tst/tst.bad_line_basic.err ================================================ illegal datum on line 23: unrecognized payload ================================================ FILE: tst/tst.bad_line_basic.in ================================================ { "start": [ 1527898727, 987783377 ], "title": "PostgreSQL statemap on HA8SDNRD2, by process ID", "host": "HA8SDNRD2", "entityKind": "Process", "states": { "on-cpu": {"value": 0, "color": "#DAF7A6" }, "off-cpu-waiting": {"value": 1, "color": "#f9f9f9" }, "off-cpu-semop": {"value": 2, "color": "#FF5733" }, "off-cpu-blocked": {"value": 3, "color": "#C70039" }, "off-cpu-zfs-read": {"value": 4, "color": "#FFC300" }, "off-cpu-zfs-write": {"value": 5, "color": "#338AFF" }, "off-cpu-zil-commit": {"value": 6, "color": "#66FFCC" }, "off-cpu-tx-wait": {"value": 7, "color": "#CCFF00" }, "off-cpu-dead": {"value": 8, "color": "#E0E0E0" } } } { "time": "90774", "entity": "586684", "state": 0 } { "time": "129359", "entity": "586680", "state": 1 } { "time": "184733", "entity": "586661", "state": 7 } { "time": "189017", "entity": "586816", "state": 0 } { "time": "273768", "entity": "586696", "state": 4 } { "badrecord": "273835", "entity": "586677", "state": 0 } { "time": "301002", "entity": "586680", "state": 0 } { "time": "310276", "entity": "586654", "state": 0 } { "time": "321186", "entity": "587470", "state": 0 } { "time": "397567", "entity": "586818", "state": 0 } { "time": "422987", "entity": "586680", "state": 1 } { "time": "475881", "entity": "586688", "state": 0 } { "time": "480090", "entity": "586818", "state": 1 } { "time": "488177", "entity": "586684", "state": 7 } { "time": "508238", "entity": "586749", "state": 0 } { "time": "572155", "entity": "586677", "state": 1 } { "time": "585023", "entity": "587481", "state": 7 } { "time": "607816", "entity": "586749", "state": 1 } { "time": "616968", "entity": "586818", "state": 0 } { "time": "642186", "entity": "586680", "state": 0 } ================================================ FILE: tst/tst.bad_line_newline.err ================================================ illegal datum on line 31: unrecognized payload ================================================ FILE: tst/tst.bad_line_newline.in ================================================ { "start": [ 1527898727, 987783377 ], "title": "PostgreSQL statemap on HA8SDNRD2, by process ID", "host": "HA8SDNRD2", "entityKind": "Process", "states": { "on-cpu": {"value": 0, "color": "#DAF7A6" }, "off-cpu-waiting": {"value": 1, "color": "#f9f9f9" }, "off-cpu-semop": {"value": 2, "color": "#FF5733" }, "off-cpu-blocked": {"value": 3, "color": "#C70039" }, "off-cpu-zfs-read": {"value": 4, "color": "#FFC300" }, "off-cpu-zfs-write": {"value": 5, "color": "#338AFF" }, "off-cpu-zil-commit": {"value": 6, "color": "#66FFCC" }, "off-cpu-tx-wait": {"value": 7, "color": "#CCFF00" }, "off-cpu-dead": {"value": 8, "color": "#E0E0E0" } } } { "time": "90774", "entity": "586684", "state": 0 } { "time": "129359", "entity": "586680", "state": 1 } { "time": "184733", "entity": "586661", "state": 7 } { "time": "189017", "entity": "586816", "state": 0 } { "time": "273768", "entity": "586696", "state": 4 } { "time": "301002", "entity": "586680", "state": 0 } { "time": "310276", "entity": "586654", "state": 0 } { "time": "321186", "entity": "587470", "state": 0 } { "time": "397567", "entity": "586818", "state": 0 } { "time": "422987", "entity": "586680", "state": 1 } { "time": "475881", "entity": "586688", "state": 0 } { "badrecord": "480090", "entity": "586818", "state": 1 } { "time": "488177", "entity": "586684", "state": 7 } { "time": "508238", "entity": "586749", "state": 0 } { "time": "572155", "entity": "586677", "state": 1 } { "time": "585023", "entity": "587481", "state": 7 } { "time": "607816", "entity": "586749", "state": 1 } { "time": "616968", "entity": "586818", "state": 0 } { "time": "642186", "entity": "586680", "state": 0 } ================================================ FILE: tst/tst.bad_line_whitespace.err ================================================ illegal datum on line 29: unrecognized payload ================================================ FILE: tst/tst.bad_line_whitespace.in ================================================ { "start": [ 1527898727, 987783377 ], "title": "PostgreSQL statemap on HA8SDNRD2, by process ID", "host": "HA8SDNRD2", "entityKind": "Process", "states": { "on-cpu": {"value": 0, "color": "#DAF7A6" }, "off-cpu-waiting": {"value": 1, "color": "#f9f9f9" }, "off-cpu-semop": {"value": 2, "color": "#FF5733" }, "off-cpu-blocked": {"value": 3, "color": "#C70039" }, "off-cpu-zfs-read": {"value": 4, "color": "#FFC300" }, "off-cpu-zfs-write": {"value": 5, "color": "#338AFF" }, "off-cpu-zil-commit": {"value": 6, "color": "#66FFCC" }, "off-cpu-tx-wait": {"value": 7, "color": "#CCFF00" }, "off-cpu-dead": {"value": 8, "color": "#E0E0E0" } } } { "time": "90774", "entity": "586684", "state": 0 } { "time": "129359", "entity": "586680", "state": 1 } { "time": "184733", "entity": "586661", "state": 7 } { "time": "189017", "entity": "586816", "state": 0 } { "time": "273768", "entity": "586696", "state": 4 } { "time": "301002", "entity": "586680", "state": 0 } { "time": "310276", "entity": "586654", "state": 0 } { "time": "321186", "entity": "587470", "state": 0 } { "time": "397567", "entity": "586818", "state": 0 } { "time": "422987", "entity": "586680", "state": 1 } { "time": "475881", "entity": "586688", "state": 0 } { "badrecord": "480090", "entity": "586818", "state": 1 } { "time": "488177", "entity": "586684", "state": 7 } { "time": "508238", "entity": "586749", "state": 0 } { "time": "572155", "entity": "586677", "state": 1 } { "time": "585023", "entity": "587481", "state": 7 } { "time": "607816", "entity": "586749", "state": 1 } { "time": "616968", "entity": "586818", "state": 0 } { "time": "642186", "entity": "586680", "state": 0 } ================================================ FILE: tst/tst.io.in ================================================ { "start": [ 1515712765, 175059957 ], "title": "Statemap for device I/O on HCFHM2TD2", "host": "HCFHM2TD2", "states": { "no I/O": {"value": 0, "color": "#e0e0e0" }, "1 I/O": {"value": 1, "color": "#ffffcc" }, "2 I/Os": {"value": 2, "color": "#ffeda0" }, "3 I/Os": {"value": 3, "color": "#fed976" }, "4 I/Os": {"value": 4, "color": "#feb24c" }, "5 I/Os": {"value": 5, "color": "#fd8d3c" }, "6 I/Os": {"value": 6, "color": "#fc4e2a" }, "7 I/Os": {"value": 7, "color": "#e31a1c" }, "8 I/Os": {"value": 8, "color": "#bd0026" }, ">8 I/Os": {"value": 9, "color": "#800026" } } } { "time": "122523", "entity": "sd3", "state": 0 } { "time": "136559", "entity": "sd4", "state": 0 } { "time": "144007", "entity": "sd6", "state": 0 } { "time": "197064", "entity": "sd6", "state": 1 } { "time": "204699", "entity": "sd8", "state": 4 } { "time": "217980", "entity": "sd8", "state": 3 } { "time": "219042", "entity": "sd4", "state": 1 } { "time": "226112", "entity": "sd8", "state": 2 } { "time": "233987", "entity": "sd2", "state": 3 } { "time": "245080", "entity": "sd8", "state": 3 } { "time": "258479", "entity": "sd5", "state": 2 } { "time": "271165", "entity": "sd1", "state": 1 } { "time": "286441", "entity": "sd8", "state": 2 } { "time": "304154", "entity": "sd7", "state": 7 } { "time": "324614", "entity": "sd7", "state": 6 } { "time": "341445", "entity": "sd8", "state": 1 } { "time": "354628", "entity": "sd3", "state": 1 } { "time": "370011", "entity": "sd7", "state": 7 } { "time": "446175", "entity": "sd7", "state": 6 } { "time": "468920", "entity": "sd4", "state": 1 } { "time": "475701", "entity": "sd4", "state": 1 } { "time": "488966", "entity": "sd3", "state": 0 } { "time": "495868", "entity": "sd2", "state": 4 } { "time": "499196", "entity": "sd7", "state": 7 } { "time": "505590", "entity": "sd8", "state": 0 } { "time": "510634", "entity": "sd6", "state": 2 } { "time": "518170", "entity": "sd8", "state": 1 } { "time": "519923", "entity": "sd1", "state": 0 } { "time": "533632", "entity": "sd5", "state": 3 } { "time": "547899", "entity": "sd1", "state": 1 } { "time": "561853", "entity": "sd7", "state": 6 } { "time": "573397", "entity": "sd3", "state": 1 } { "time": "573456", "entity": "sd2", "state": 3 } { "time": "582845", "entity": "sd7", "state": 7 } { "time": "592933", "entity": "sd6", "state": 3 } { "time": "611640", "entity": "sd7", "state": 6 } { "time": "617899", "entity": "sd7", "state": 5 } { "time": "638869", "entity": "sd6", "state": 2 } { "time": "651313", "entity": "sd7", "state": 4 } { "time": "668226", "entity": "sd7", "state": 3 } { "time": "688325", "entity": "sd8", "state": 2 } { "time": "702999", "entity": "sd5", "state": 4 } { "time": "704915", "entity": "sd6", "state": 1 } { "time": "731014", "entity": "sd7", "state": 2 } { "time": "740876", "entity": "sd7", "state": 1 } { "time": "747430", "entity": "sd7", "state": 0 } { "time": "764305", "entity": "sd8", "state": 3 } { "time": "765171", "entity": "sd4", "state": 0 } { "time": "775917", "entity": "sd5", "state": 5 } { "time": "784865", "entity": "sd1", "state": 0 } { "time": "794219", "entity": "sd6", "state": 2 } { "time": "802379", "entity": "sd5", "state": 4 } { "time": "804071", "entity": "sd3", "state": 2 } { "time": "814227", "entity": "sd7", "state": 1 } { "time": "817592", "entity": "sd4", "state": 1 } { "time": "822131", "entity": "sd8", "state": 2 } { "time": "824538", "entity": "sd7", "state": 2 } { "time": "827469", "entity": "sd6", "state": 3 } { "time": "829852", "entity": "sd8", "state": 1 } { "time": "836807", "entity": "sd2", "state": 4 } { "time": "848386", "entity": "sd4", "state": 2 } { "time": "858331", "entity": "sd5", "state": 3 } { "time": "867636", "entity": "sd8", "state": 2 } { "time": "869196", "entity": "sd7", "state": 3 } { "time": "879278", "entity": "sd7", "state": 4 } { "time": "881291", "entity": "sd5", "state": 4 } { "time": "893179", "entity": "sd1", "state": 1 } { "time": "898015", "entity": "sd6", "state": 4 } { "time": "902098", "entity": "sd6", "state": 5 } { "time": "909303", "entity": "sd3", "state": 1 } { "time": "913168", "entity": "sd4", "state": 3 } { "time": "923748", "entity": "sd7", "state": 5 } { "time": "925732", "entity": "sd5", "state": 3 } { "time": "926853", "entity": "sd2", "state": 5 } { "time": "936067", "entity": "sd3", "state": 0 } { "time": "936716", "entity": "sd1", "state": 2 } { "time": "939044", "entity": "sd8", "state": 3 } { "time": "943174", "entity": "sd7", "state": 6 } { "time": "944707", "entity": "sd6", "state": 6 } { "time": "945970", "entity": "sd5", "state": 4 } { "time": "946514", "entity": "sd8", "state": 2 } { "time": "952966", "entity": "sd3", "state": 1 } { "time": "953633", "entity": "sd8", "state": 3 } ================================================ FILE: tst/tst.tag_basic.in ================================================ { "start": [ 1528482355, 856625707 ], "title": "Statemap for CPU activity on HA8S7MRD2", "host": "HA8S7MRD2", "entityKind": "CPU", "states": { "uthread": {"value": 0, "color": "#9BC362" }, "kthread": {"value": 1, "color": "#2E4E00" }, "level-1": {"value": 2, "color": "#689D99" }, "level-2": {"value": 3, "color": "#41837E" }, "level-3": {"value": 4, "color": "#236863" }, "level-4": {"value": 5, "color": "#0D4E4A" }, "level-5": {"value": 6, "color": "#003430" }, "level-6": {"value": 7, "color": "#817FB2" }, "level-7": {"value": 8, "color": "#575594" }, "level-8": {"value": 9, "color": "#363377" }, "level-9": {"value": 10, "color": "#1C1A59" }, "level-10": {"value": 11, "color": "#0A093B" }, "level-11": {"value": 12, "color": "#FFAAAA" }, "level-12": {"value": 13, "color": "#D46A6A" }, "level-13": {"value": 14, "color": "#AA3939" }, "level-14": {"value": 15, "color": "#801515" }, "level-15": {"value": 16, "color": "#550000" }, "idle": {"value": 17, "color": "#e0e0e0" } } } { "time": "133694", "entity": "14", "state": 17 } { "time": "133726", "entity": "0", "state": 17 } { "time": "133731", "entity": "8", "state": 17 } { "time": "133776", "entity": "12", "state": 17 } { "time": "133779", "entity": "28", "state": 17 } { "time": "133783", "entity": "20", "state": 17 } { "time": "133819", "entity": "18", "state": 17 } { "time": "133859", "entity": "5", "state": 17 } { "time": "133863", "entity": "22", "state": 17 } { "time": "133888", "entity": "11", "state": 17 } { "time": "133917", "entity": "7", "state": 17 } { "time": "133961", "entity": "3", "state": 17 } { "time": "133979", "entity": "21", "state": 17 } { "time": "134574", "entity": "9", "state": 17 } { "time": "135203", "entity": "35", "state": 17 } { "time": "136037", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "136389", "entity": "31", "state": 17 } { "time": "136724", "entity": "17", "state": 17 } { "time": "137094", "entity": "40", "state": 17 } { "time": "137133", "entity": "46", "state": 17 } { "time": "137348", "entity": "13", "state": 17 } { "time": "137701", "entity": "6", "state": 17 } { "time": "138148", "entity": "29", "state": 17 } { "time": "138234", "entity": "1", "state": 17 } { "time": "138244", "entity": "44", "state": 17 } { "time": "139739", "entity": "41", "state": 0, "tag": "49a7f3e" } { "time": "139979", "entity": "37", "state": 17 } { "time": "141144", "entity": "25", "state": 17 } { "time": "141240", "entity": "53", "state": 17 } { "time": "141384", "entity": "32", "state": 17 } { "time": "141553", "entity": "39", "state": 17 } { "time": "141598", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "141960", "entity": "55", "state": 17 } { "time": "141978", "entity": "27", "state": 17 } { "time": "142181", "entity": "10", "state": 17 } { "time": "142336", "entity": "28", "state": 15 } { "time": "142496", "entity": "51", "state": 17 } { "time": "142744", "entity": "23", "state": 17 } { "time": "143454", "entity": "19", "state": 17 } { "time": "143551", "entity": "47", "state": 17 } { "time": "143638", "entity": "30", "state": 17 } { "time": "144457", "entity": "33", "state": 17 } { "time": "144680", "entity": "43", "state": 17 } { "time": "144739", "entity": "15", "state": 17 } { "time": "144784", "entity": "36", "state": 17 } { "time": "145279", "entity": "50", "state": 17 } { "time": "145292", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "145567", "entity": "42", "state": 17 } { "time": "146407", "entity": "48", "state": 1, "tag": "3c4" } { "time": "148558", "entity": "34", "state": 17 } { "time": "148758", "entity": "38", "state": 17 } { "time": "149461", "entity": "26", "state": 17 } { "time": "149464", "entity": "54", "state": 17 } { "time": "149917", "entity": "28", "state": 17 } { "time": "151111", "entity": "24", "state": 17 } { "state": 2, "tag": "3", "driver": "softint", "instance": 0 } { "time": "151161", "entity": "52", "state": 17 } { "time": "158287", "entity": "28", "state": 3, "tag": "2" } { "time": "159063", "entity": "49", "state": 17 } { "state": 0, "tag": "4a0e384", "pid": "50378", "tid": "1", "execname": "dtrace", "psargs": "/usr/sbin/dtrace -Cs ./postgres-statemap-zfs.d" } { "time": "170534", "entity": "28", "state": 17 } { "time": "173279", "entity": "0", "state": 0, "tag": "4a0e384" } { "state": 0, "tag": "49a7f42", "pid": "565192", "tid": "66", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "184732", "entity": "28", "state": 0, "tag": "49a7f42" } { "time": "198289", "entity": "4", "state": 17 } { "state": 0, "tag": "49a7f49", "pid": "565192", "tid": "74", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "215317", "entity": "4", "state": 0, "tag": "49a7f49" } { "state": 0, "tag": "497cdd3", "pid": "565192", "tid": "19", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "236759", "entity": "28", "state": 17 } { "time": "240371", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "245952", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "251572", "entity": "52", "state": 15 } { "time": "256407", "entity": "4", "state": 17 } { "time": "257895", "entity": "52", "state": 17 } { "time": "263286", "entity": "52", "state": 3, "tag": "2" } { "time": "273170", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "275226", "entity": "52", "state": 17 } { "state": 0, "tag": "49a7f45", "pid": "565192", "tid": "70", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f32", "pid": "565192", "tid": "51", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "296823", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "298706", "entity": "0", "state": 16 } { "time": "299990", "entity": "19", "state": 0, "tag": "49a7f32" } { "state": 0, "tag": "49a7f46", "pid": "565192", "tid": "71", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "303706", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "307335", "entity": "31", "state": 0, "tag": "49a7f46" } { "state": 0, "tag": "497cdd0", "pid": "565192", "tid": "16", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "4a0e388", "pid": "50380", "tid": "1", "execname": "pg_xlogdump", "psargs": "/opt/postgresql/current/bin/pg_xlogdump -f /manatee/pg/data/pg_xlog/00000001000" } { "time": "311412", "entity": "4", "state": 17 } { "time": "312858", "entity": "36", "state": 17 } { "time": "315103", "entity": "1", "state": 16 } { "time": "315435", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "320596", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "323738", "entity": "1", "state": 17 } { "time": "324471", "entity": "41", "state": 17 } { "time": "327464", "entity": "2", "state": 16 } { "state": 0, "tag": "49a7f3e", "pid": "565192", "tid": "63", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "330894", "entity": "2", "state": 17 } { "time": "333404", "entity": "41", "state": 0, "tag": "49a7f3e" } { "time": "335503", "entity": "3", "state": 16 } { "time": "341680", "entity": "3", "state": 17 } { "time": "344099", "entity": "4", "state": 16 } { "time": "347527", "entity": "45", "state": 17 } { "time": "347942", "entity": "4", "state": 17 } { "time": "351280", "entity": "5", "state": 16 } { "state": 0, "tag": "49a7f2e", "pid": "565192", "tid": "47", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "355510", "entity": "5", "state": 17 } { "time": "357571", "entity": "19", "state": 17 } { "time": "359891", "entity": "6", "state": 16 } { "time": "360586", "entity": "49", "state": 17 } { "time": "365971", "entity": "6", "state": 17 } { "time": "367461", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "368755", "entity": "7", "state": 16 } { "time": "368815", "entity": "31", "state": 16 } { "time": "369961", "entity": "10", "state": 16 } { "time": "370707", "entity": "52", "state": 16 } { "time": "371639", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "372586", "entity": "7", "state": 17 } { "time": "372850", "entity": "14", "state": 17 } { "time": "373621", "entity": "45", "state": 16 } { "time": "375707", "entity": "8", "state": 16 } { "time": "377134", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "377401", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "379466", "entity": "8", "state": 17 } { "time": "380914", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "413422", "entity": "31", "state": 17 } { "time": "449800", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "450431", "entity": "49", "state": 0, "tag": "497cdd3" } { "state": 7, "tag": "ffffd062dbcb7d58", "driver": "ixgbe", "instance": 2 } { "time": "468924", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "469468", "entity": "30", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "470025", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "471607", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "477875", "entity": "10", "state": 17 } { "time": "484799", "entity": "10", "state": 0, "tag": "497cdd0" } { "state": 0, "tag": "497cdd1", "pid": "565192", "tid": "17", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "485897", "entity": "4", "state": 17 } { "time": "491362", "entity": "31", "state": 17 } { "time": "491825", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "492884", "entity": "30", "state": 17 } { "time": "496488", "entity": "31", "state": 0, "tag": "49a7f46" } { "state": 0, "tag": "48d4b6d", "pid": "5447", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "503227", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "503832", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "506328", "entity": "11", "state": 17 } { "time": "509977", "entity": "11", "state": 0, "tag": "497cdd1" } { "state": 0, "tag": "497cdd4", "pid": "565192", "tid": "20", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "523775", "entity": "22", "state": 0, "tag": "497cdd4" } { "state": 0, "tag": "497cd9f", "pid": "565192", "tid": "1", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "532235", "entity": "53", "state": 0, "tag": "497cd9f" } { "state": 0, "tag": "4980fc2", "pid": "565192", "tid": "27", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "497cdd9", "pid": "565192", "tid": "24", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "542614", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "546541", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "547085", "entity": "41", "state": 17 } { "time": "549434", "entity": "11", "state": 17 } { "time": "555295", "entity": "49", "state": 17 } { "state": 0, "tag": "48d4b75", "pid": "5447", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "557568", "entity": "4", "state": 17 } { "time": "558415", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "559789", "entity": "53", "state": 17 } { "time": "564353", "entity": "8", "state": 0, "tag": "48d4b75" } { "time": "573039", "entity": "9", "state": 17 } { "time": "576830", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "578248", "entity": "46", "state": 17 } { "time": "586259", "entity": "8", "state": 17 } { "time": "586378", "entity": "36", "state": 17 } { "time": "591726", "entity": "49", "state": 17 } { "time": "594180", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "606345", "entity": "31", "state": 17 } { "time": "609029", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "615014", "entity": "53", "state": 17 } { "time": "623515", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "635285", "entity": "45", "state": 17 } { "time": "641951", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "642296", "entity": "31", "state": 17 } { "time": "657898", "entity": "53", "state": 17 } { "time": "658525", "entity": "52", "state": 17 } { "time": "664378", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "668175", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "669848", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "671815", "entity": "22", "state": 17 } { "time": "689085", "entity": "10", "state": 17 } { "time": "696634", "entity": "49", "state": 17 } { "time": "697889", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "699569", "entity": "19", "state": 17 } { "time": "703265", "entity": "14", "state": 17 } { "time": "718505", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "728522", "entity": "52", "state": 17 } { "time": "735026", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "736636", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "739400", "entity": "0", "state": 15 } { "time": "743280", "entity": "0", "state": 0, "tag": "4a0e384" } { "state": 10, "tag": "b", "driver": "softint", "instance": 0 } { "time": "747031", "entity": "0", "state": 11, "tag": "a" } { "time": "752452", "entity": "10", "state": 17 } { "time": "752901", "entity": "53", "state": 17 } { "time": "753787", "entity": "49", "state": 17 } { "time": "754077", "entity": "16", "state": 17 } { "time": "762849", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "767901", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "775953", "entity": "19", "state": 17 } { "time": "785696", "entity": "49", "state": 17 } { "time": "786067", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "838177", "entity": "45", "state": 17 } { "time": "901231", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "923069", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "927589", "entity": "19", "state": 17 } { "time": "938479", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "947220", "entity": "31", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "961419", "entity": "45", "state": 17 } { "time": "966595", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "975225", "entity": "31", "state": 17 } { "state": 0, "tag": "48d4ade", "pid": "5336", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "983732", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "988698", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1006460", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1018551", "entity": "49", "state": 17 } { "time": "1020723", "entity": "53", "state": 17 } { "time": "1025056", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1029210", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1031701", "entity": "14", "state": 0, "tag": "4a0e388" } { "state": 0, "tag": "48d4ae8", "pid": "5336", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "1040160", "entity": "52", "state": 17 } { "time": "1045495", "entity": "21", "state": 0, "tag": "48d4ae8" } { "time": "1053860", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1056323", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1063767", "entity": "21", "state": 17 } { "time": "1064227", "entity": "10", "state": 17 } { "time": "1070591", "entity": "14", "state": 17 } { "time": "1076581", "entity": "49", "state": 17 } { "time": "1076899", "entity": "53", "state": 17 } { "time": "1079487", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1085729", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1104374", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1113664", "entity": "52", "state": 17 } { "time": "1117162", "entity": "53", "state": 17 } { "time": "1119151", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1119914", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1123006", "entity": "49", "state": 17 } { "state": 0, "tag": "4a0e383", "pid": "50377", "tid": "1", "execname": "dtrace", "psargs": "/usr/sbin/dtrace -Cs ./cpu-statemap-tagged.d" } { "time": "1128525", "entity": "16", "state": 0, "tag": "4a0e383" } { "time": "1133011", "entity": "9", "state": 16 } { "time": "1137190", "entity": "9", "state": 17 } { "time": "1137845", "entity": "10", "state": 17 } { "time": "1143092", "entity": "10", "state": 16 } { "time": "1149172", "entity": "10", "state": 17 } { "time": "1151888", "entity": "11", "state": 16 } { "time": "1153362", "entity": "45", "state": 17 } { "time": "1154832", "entity": "52", "state": 17 } { "time": "1156133", "entity": "11", "state": 17 } { "time": "1156908", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1159816", "entity": "12", "state": 16 } { "time": "1160547", "entity": "30", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "1162840", "entity": "12", "state": 17 } { "time": "1166278", "entity": "19", "state": 17 } { "time": "1166405", "entity": "13", "state": 16 } { "time": "1170340", "entity": "22", "state": 17 } { "time": "1171318", "entity": "13", "state": 17 } { "time": "1173640", "entity": "30", "state": 17 } { "time": "1173786", "entity": "14", "state": 16 } { "time": "1177357", "entity": "14", "state": 17 } { "state": 0, "tag": "48d4ced", "pid": "5737", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2023 -k 3023" } { "time": "1184808", "entity": "15", "state": 0, "tag": "48d4ced" } { "time": "1188092", "entity": "15", "state": 16 } { "time": "1192735", "entity": "15", "state": 0, "tag": "48d4ced" } { "time": "1201969", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1205236", "entity": "17", "state": 16 } { "time": "1213509", "entity": "17", "state": 17 } { "time": "1214693", "entity": "18", "state": 16 } { "time": "1217933", "entity": "31", "state": 17 } { "time": "1218025", "entity": "18", "state": 17 } { "time": "1222783", "entity": "19", "state": 16 } { "time": "1223052", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1231369", "entity": "19", "state": 17 } { "time": "1234496", "entity": "20", "state": 16 } { "state": 0, "tag": "48d4d00", "pid": "5737", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2023 -k 3023" } { "time": "1239245", "entity": "20", "state": 17 } { "time": "1239831", "entity": "22", "state": 17 } { "time": "1240063", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "1241645", "entity": "21", "state": 16 } { "time": "1242848", "entity": "41", "state": 0, "tag": "48d4d00" } { "time": "1247578", "entity": "21", "state": 17 } { "time": "1250339", "entity": "22", "state": 16 } { "time": "1254272", "entity": "22", "state": 17 } { "time": "1254559", "entity": "41", "state": 17 } { "time": "1256915", "entity": "23", "state": 16 } { "time": "1261109", "entity": "23", "state": 17 } { "time": "1264991", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1265886", "entity": "24", "state": 16 } { "state": 0, "tag": "497d20a", "pid": "566150", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "1274130", "entity": "24", "state": 17 } { "time": "1275439", "entity": "25", "state": 16 } { "time": "1278104", "entity": "2", "state": 0, "tag": "497d20a" } { "time": "1280783", "entity": "25", "state": 17 } { "time": "1284410", "entity": "26", "state": 16 } { "time": "1285340", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1290577", "entity": "26", "state": 17 } { "time": "1293829", "entity": "27", "state": 16 } { "time": "1299840", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "1301420", "entity": "22", "state": 17 } { "time": "1302605", "entity": "28", "state": 16 } { "time": "1305409", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1307933", "entity": "28", "state": 17 } { "time": "1311223", "entity": "29", "state": 16 } { "time": "1318349", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "1320548", "entity": "30", "state": 16 } { "time": "1324450", "entity": "30", "state": 17 } { "time": "1326355", "entity": "31", "state": 17 } { "time": "1328330", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1328586", "entity": "22", "state": 17 } { "time": "1328695", "entity": "31", "state": 16 } { "time": "1332677", "entity": "31", "state": 17 } { "time": "1336344", "entity": "32", "state": 16 } { "time": "1340039", "entity": "32", "state": 17 } { "time": "1342203", "entity": "33", "state": 16 } { "time": "1345521", "entity": "33", "state": 17 } { "time": "1349615", "entity": "34", "state": 16 } { "time": "1354008", "entity": "34", "state": 17 } { "time": "1356043", "entity": "35", "state": 16 } { "time": "1359384", "entity": "35", "state": 17 } { "time": "1361625", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1362681", "entity": "36", "state": 16 } { "time": "1366323", "entity": "36", "state": 17 } { "time": "1367733", "entity": "30", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "1369031", "entity": "45", "state": 17 } { "time": "1369266", "entity": "37", "state": 16 } { "time": "1372514", "entity": "37", "state": 17 } { "time": "1378625", "entity": "38", "state": 16 } { "time": "1379993", "entity": "2", "state": 17 } { "time": "1386771", "entity": "30", "state": 17 } { "time": "1387798", "entity": "38", "state": 17 } { "time": "1387821", "entity": "22", "state": 17 } { "time": "1388067", "entity": "39", "state": 16 } { "time": "1388228", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1391467", "entity": "39", "state": 17 } { "time": "1393949", "entity": "40", "state": 16 } { "time": "1395988", "entity": "40", "state": 17 } { "time": "1399028", "entity": "41", "state": 16 } { "time": "1402723", "entity": "41", "state": 17 } { "time": "1406240", "entity": "42", "state": 16 } { "time": "1408563", "entity": "42", "state": 17 } { "time": "1412926", "entity": "43", "state": 16 } { "time": "1418481", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1418781", "entity": "43", "state": 17 } { "time": "1421034", "entity": "44", "state": 16 } { "time": "1424874", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "1424927", "entity": "44", "state": 17 } { "time": "1428749", "entity": "45", "state": 16 } { "time": "1431809", "entity": "10", "state": 17 } { "time": "1436972", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1438380", "entity": "46", "state": 16 } { "time": "1440527", "entity": "46", "state": 17 } { "time": "1444400", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1448049", "entity": "47", "state": 16 } { "time": "1449582", "entity": "10", "state": 0, "tag": "497cdd0" } { "state": 0, "tag": "497d212", "pid": "566158", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "1456559", "entity": "37", "state": 0, "tag": "497d212" } { "time": "1458812", "entity": "47", "state": 17 } { "time": "1459196", "entity": "19", "state": 17 } { "time": "1459808", "entity": "48", "state": 16 } { "time": "1460858", "entity": "14", "state": 17 } { "time": "1462700", "entity": "22", "state": 17 } { "time": "1463447", "entity": "48", "state": 1, "tag": "3c4" } { "time": "1466417", "entity": "49", "state": 16 } { "time": "1469928", "entity": "49", "state": 17 } { "time": "1475559", "entity": "50", "state": 16 } { "time": "1476464", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1480197", "entity": "50", "state": 17 } { "state": 0, "tag": "48d4e10", "pid": "5958", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2024 -k 3024" } { "time": "1481808", "entity": "51", "state": 16 } { "time": "1484985", "entity": "51", "state": 17 } { "time": "1490063", "entity": "52", "state": 16 } { "time": "1491640", "entity": "45", "state": 0, "tag": "48d4e10" } { "time": "1498337", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1499681", "entity": "53", "state": 16 } { "time": "1503542", "entity": "53", "state": 17 } { "time": "1507553", "entity": "54", "state": 16 } { "time": "1507610", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1511913", "entity": "54", "state": 17 } { "time": "1514247", "entity": "10", "state": 17 } { "time": "1515873", "entity": "55", "state": 16 } { "time": "1520140", "entity": "22", "state": 17 } { "time": "1522315", "entity": "55", "state": 17 } { "time": "1527856", "entity": "27", "state": 17 } { "time": "1531660", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1540257", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1550117", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "1557017", "entity": "31", "state": 17 } { "time": "1563796", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "1566090", "entity": "22", "state": 17 } { "time": "1566148", "entity": "45", "state": 0, "tag": "48d4e10" } { "time": "1566354", "entity": "52", "state": 17 } { "time": "1568814", "entity": "2", "state": 0, "tag": "497d20a" } { "time": "1570616", "entity": "9", "state": 15 } { "time": "1571878", "entity": "46", "state": 15 } { "time": "1573357", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1573496", "entity": "46", "state": 17 } { "time": "1574862", "entity": "9", "state": 17 } { "time": "1576428", "entity": "46", "state": 3, "tag": "2" } { "time": "1576608", "entity": "37", "state": 17 } { "time": "1578950", "entity": "8", "state": 15 } { "time": "1579862", "entity": "9", "state": 3, "tag": "2" } { "time": "1581274", "entity": "8", "state": 17 } { "time": "1582362", "entity": "46", "state": 17 } { "time": "1584227", "entity": "8", "state": 3, "tag": "2" } { "time": "1586328", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1590277", "entity": "8", "state": 17 } { "time": "1590464", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1590591", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1591543", "entity": "9", "state": 17 } { "time": "1594956", "entity": "8", "state": 0, "tag": "48d4b75" } { "time": "1600794", "entity": "29", "state": 17 } { "time": "1601223", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "1601876", "entity": "8", "state": 17 } { "time": "1602851", "entity": "22", "state": 17 } { "time": "1612606", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1619928", "entity": "10", "state": 17 } { "time": "1621241", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1622825", "entity": "9", "state": 17 } { "time": "1625312", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1639370", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "1640702", "entity": "31", "state": 17 } { "time": "1678850", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1680520", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1692340", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1694963", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "1700982", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "1706068", "entity": "46", "state": 0, "tag": "48d4e10" } { "time": "1713100", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1717396", "entity": "31", "state": 17 } { "time": "1718374", "entity": "1", "state": 0, "tag": "48d4e10" } { "time": "1721948", "entity": "9", "state": 16 } { "time": "1722376", "entity": "22", "state": 16 } { "time": "1722398", "entity": "36", "state": 16 } { "time": "1722545", "entity": "46", "state": 16 } { "time": "1723026", "entity": "10", "state": 16 } { "time": "1723152", "entity": "49", "state": 16 } { "time": "1723829", "entity": "53", "state": 16 } { "time": "1723893", "entity": "19", "state": 16 } { "time": "1724110", "entity": "45", "state": 16 } { "time": "1724830", "entity": "52", "state": 16 } { "time": "1725469", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1725641", "entity": "49", "state": 17 } { "time": "1725958", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "1726469", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "1726734", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1727245", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1727648", "entity": "37", "state": 0, "tag": "497d212" } { "time": "1727681", "entity": "49", "state": 17 } { "time": "1730123", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1730633", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "1731250", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1731403", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1732151", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1739845", "entity": "0", "state": 15 } { "time": "1746589", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "1749918", "entity": "0", "state": 11, "tag": "a" } { "time": "1751913", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1752389", "entity": "27", "state": 17 } { "state": 0, "tag": "497d4e2", "pid": "566865", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "1755671", "entity": "36", "state": 17 } { "time": "1758552", "entity": "36", "state": 0, "tag": "49a7f42" } { "state": 0, "tag": "48d4e18", "pid": "5958", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2024 -k 3024" } { "time": "1767581", "entity": "50", "state": 0, "tag": "48d4e18" } { "time": "1767920", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "1768630", "entity": "19", "state": 17 } { "time": "1774944", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "1776434", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "1778474", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "1783434", "entity": "11", "state": 17 } { "time": "1785617", "entity": "15", "state": 17 } { "time": "1789972", "entity": "50", "state": 17 } { "time": "1790371", "entity": "31", "state": 17 } { "time": "1798662", "entity": "22", "state": 17 } { "time": "1799659", "entity": "53", "state": 17 } { "time": "1799775", "entity": "49", "state": 17 } { "time": "1800147", "entity": "45", "state": 17 } { "time": "1802644", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1804234", "entity": "9", "state": 17 } { "time": "1804314", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "1815421", "entity": "52", "state": 17 } { "time": "1831927", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1842650", "entity": "49", "state": 17 } { "time": "1853453", "entity": "46", "state": 17 } { "time": "1854478", "entity": "47", "state": 17 } { "time": "1857286", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1857662", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "1860962", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "1861543", "entity": "36", "state": 17 } { "time": "1863742", "entity": "4", "state": 17 } { "time": "1865505", "entity": "17", "state": 17 } { "time": "1866888", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "1868188", "entity": "46", "state": 17 } { "time": "1885355", "entity": "10", "state": 17 } { "time": "1891052", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1908947", "entity": "14", "state": 17 } { "time": "1928141", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1973538", "entity": "4", "state": 17 } { "time": "2013125", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "2027694", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2034820", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "2051826", "entity": "46", "state": 17 } { "time": "2057896", "entity": "21", "state": 15 } { "time": "2060651", "entity": "36", "state": 17 } { "time": "2061335", "entity": "21", "state": 17 } { "time": "2063578", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2064235", "entity": "21", "state": 3, "tag": "2" } { "time": "2068218", "entity": "4", "state": 17 } { "time": "2070666", "entity": "21", "state": 17 } { "time": "2076440", "entity": "21", "state": 0, "tag": "48d4ae8" } { "time": "2084643", "entity": "21", "state": 17 } { "time": "2088885", "entity": "47", "state": 17 } { "time": "2095628", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2105539", "entity": "36", "state": 17 } { "time": "2166276", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2201863", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "2228637", "entity": "4", "state": 17 } { "time": "2231212", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "2249903", "entity": "4", "state": 17 } { "time": "2251762", "entity": "41", "state": 15 } { "time": "2253203", "entity": "41", "state": 17 } { "time": "2255393", "entity": "41", "state": 3, "tag": "2" } { "time": "2260551", "entity": "41", "state": 17 } { "time": "2264500", "entity": "41", "state": 0, "tag": "48d4d00" } { "time": "2269824", "entity": "41", "state": 17 } { "time": "2284834", "entity": "10", "state": 17 } { "time": "2291061", "entity": "52", "state": 17 } { "time": "2301592", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "2305757", "entity": "2", "state": 17 } { "state": 0, "tag": "497e0d4", "pid": "569380", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "2322704", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2323720", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "2327364", "entity": "19", "state": 0, "tag": "497e0d4" } { "time": "2327891", "entity": "36", "state": 17 } { "time": "2336478", "entity": "38", "state": 0, "tag": "48d4b75" } { "time": "2350895", "entity": "1", "state": 17 } { "time": "2360872", "entity": "38", "state": 17 } { "time": "2362577", "entity": "14", "state": 17 } { "time": "2373219", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2401842", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "2410496", "entity": "52", "state": 17 } { "time": "2410586", "entity": "47", "state": 17 } { "time": "2445800", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2446541", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "2447611", "entity": "16", "state": 17 } { "time": "2458415", "entity": "37", "state": 17 } { "time": "2461516", "entity": "21", "state": 0, "tag": "48d4ae8" } { "time": "2467039", "entity": "21", "state": 17 } { "time": "2484067", "entity": "36", "state": 17 } { "time": "2484984", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2487284", "entity": "52", "state": 17 } { "time": "2491074", "entity": "2", "state": 0, "tag": "497d20a" } { "time": "2511956", "entity": "2", "state": 17 } { "time": "2530247", "entity": "15", "state": 0, "tag": "48d4ced" } { "time": "2546597", "entity": "41", "state": 0, "tag": "48d4d00" } { "time": "2551849", "entity": "41", "state": 17 } { "time": "2553991", "entity": "26", "state": 17 } { "time": "2598265", "entity": "37", "state": 0, "tag": "497d212" } { "time": "2612822", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2616846", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "2618688", "entity": "37", "state": 17 } { "time": "2624719", "entity": "10", "state": 17 } { "time": "2628302", "entity": "17", "state": 17 } { "time": "2652173", "entity": "14", "state": 17 } { "time": "2698733", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "2713062", "entity": "15", "state": 17 } { "time": "2718744", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "2738856", "entity": "11", "state": 15 } { "time": "2739184", "entity": "53", "state": 15 } { "time": "2739223", "entity": "13", "state": 15 } { "time": "2739227", "entity": "33", "state": 15 } { "time": "2739356", "entity": "35", "state": 15 } { "time": "2739437", "entity": "0", "state": 15 } { "time": "2739444", "entity": "22", "state": 15 } { "time": "2739524", "entity": "23", "state": 15 } { "time": "2739527", "entity": "12", "state": 15 } { "time": "2739800", "entity": "21", "state": 15 } { "time": "2739816", "entity": "36", "state": 15 } { "time": "2739819", "entity": "49", "state": 15 } { "time": "2739830", "entity": "14", "state": 15 } { "time": "2739847", "entity": "48", "state": 15 } { "time": "2739980", "entity": "15", "state": 15 } { "time": "2740110", "entity": "16", "state": 15 } { "time": "2740137", "entity": "37", "state": 15 } { "time": "2740149", "entity": "4", "state": 15 } { "time": "2740488", "entity": "30", "state": 15 } { "time": "2740512", "entity": "32", "state": 15 } { "time": "2740623", "entity": "11", "state": 17 } { "time": "2740924", "entity": "52", "state": 15 } { "time": "2741143", "entity": "1", "state": 15 } { "time": "2741149", "entity": "29", "state": 15 } { "time": "2741154", "entity": "10", "state": 15 } { "time": "2741427", "entity": "26", "state": 15 } { "time": "2741623", "entity": "33", "state": 17 } { "time": "2741668", "entity": "53", "state": 17 } { "time": "2741898", "entity": "12", "state": 17 } { "time": "2742244", "entity": "13", "state": 17 } { "time": "2742964", "entity": "21", "state": 17 } { "time": "2743620", "entity": "23", "state": 17 } { "time": "2743646", "entity": "49", "state": 17 } { "time": "2743658", "entity": "35", "state": 17 } { "time": "2743684", "entity": "11", "state": 11, "tag": "a" } { "time": "2743960", "entity": "22", "state": 17 } { "time": "2744663", "entity": "33", "state": 11, "tag": "a" } { "time": "2744680", "entity": "53", "state": 11, "tag": "a" } { "time": "2744789", "entity": "14", "state": 17 } { "time": "2744980", "entity": "47", "state": 15 } { "time": "2745068", "entity": "12", "state": 11, "tag": "a" } { "time": "2745110", "entity": "36", "state": 17 } { "time": "2745119", "entity": "15", "state": 17 } { "time": "2745444", "entity": "21", "state": 11, "tag": "a" } { "time": "2745609", "entity": "13", "state": 11, "tag": "a" } { "time": "2745804", "entity": "48", "state": 1, "tag": "3c4" } { "time": "2746183", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "2746302", "entity": "37", "state": 17 } { "time": "2746306", "entity": "49", "state": 11, "tag": "a" } { "time": "2746344", "entity": "16", "state": 17 } { "time": "2746428", "entity": "23", "state": 11, "tag": "a" } { "time": "2746493", "entity": "4", "state": 17 } { "time": "2746496", "entity": "30", "state": 17 } { "time": "2746569", "entity": "35", "state": 11, "tag": "a" } { "time": "2746608", "entity": "32", "state": 17 } { "time": "2747310", "entity": "22", "state": 11, "tag": "a" } { "time": "2747848", "entity": "14", "state": 11, "tag": "a" } { "time": "2748202", "entity": "1", "state": 17 } { "time": "2748519", "entity": "0", "state": 11, "tag": "a" } { "time": "2748767", "entity": "15", "state": 11, "tag": "a" } { "time": "2748842", "entity": "36", "state": 11, "tag": "a" } { "time": "2748989", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "2749477", "entity": "10", "state": 17 } { "time": "2749892", "entity": "30", "state": 11, "tag": "a" } { "time": "2749933", "entity": "16", "state": 11, "tag": "a" } { "time": "2750103", "entity": "48", "state": 11, "tag": "a" } { "time": "2750214", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2750477", "entity": "4", "state": 11, "tag": "a" } { "time": "2750480", "entity": "32", "state": 11, "tag": "a" } { "time": "2750619", "entity": "37", "state": 11, "tag": "a" } { "time": "2751894", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "2752222", "entity": "12", "state": 17 } { "time": "2753033", "entity": "29", "state": 11, "tag": "a" } { "time": "2753036", "entity": "1", "state": 11, "tag": "a" } { "time": "2753619", "entity": "33", "state": 17 } { "time": "2754750", "entity": "11", "state": 17 } { "time": "2756235", "entity": "14", "state": 17 } { "time": "2756564", "entity": "52", "state": 11, "tag": "a" } { "time": "2756724", "entity": "10", "state": 11, "tag": "a" } { "time": "2757240", "entity": "37", "state": 17 } { "time": "2757510", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2758979", "entity": "16", "state": 17 } { "time": "2758984", "entity": "26", "state": 11, "tag": "a" } { "state": 1, "tag": "508", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2762129", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "2763958", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "2763992", "entity": "0", "state": 3, "tag": "2" } { "time": "2764529", "entity": "48", "state": 1, "tag": "3c4" } { "state": 1, "tag": "506", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "56b", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2765826", "entity": "0", "state": 0, "tag": "4a0e384" } { "state": 1, "tag": "50c", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2766634", "entity": "47", "state": 11, "tag": "a" } { "time": "2769168", "entity": "8", "state": 1, "tag": "508" } { "time": "2769369", "entity": "15", "state": 17 } { "time": "2769781", "entity": "16", "state": 1, "tag": "56b" } { "time": "2770167", "entity": "50", "state": 1, "tag": "50c" } { "time": "2770906", "entity": "11", "state": 1, "tag": "506" } { "state": 1, "tag": "572", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2775305", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2775728", "entity": "10", "state": 17 } { "state": 1, "tag": "589", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "511", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2778446", "entity": "32", "state": 17 } { "state": 1, "tag": "563", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "588", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2779948", "entity": "6", "state": 1, "tag": "572" } { "time": "2781106", "entity": "11", "state": 15 } { "state": 1, "tag": "50f", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "591", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2781550", "entity": "18", "state": 1, "tag": "589" } { "time": "2782610", "entity": "31", "state": 1, "tag": "563" } { "time": "2782633", "entity": "8", "state": 1, "tag": "588" } { "time": "2783057", "entity": "11", "state": 1, "tag": "506" } { "time": "2783200", "entity": "20", "state": 1, "tag": "511" } { "time": "2784164", "entity": "50", "state": 1, "tag": "591" } { "state": 1, "tag": "568", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2785196", "entity": "11", "state": 3, "tag": "2" } { "state": 1, "tag": "505", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2786380", "entity": "43", "state": 1, "tag": "50f" } { "time": "2786979", "entity": "50", "state": 15 } { "time": "2787490", "entity": "13", "state": 17 } { "time": "2787981", "entity": "10", "state": 0, "tag": "497cdd0" } { "state": 1, "tag": "494", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2789225", "entity": "32", "state": 1, "tag": "568" } { "state": 1, "tag": "50b", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2789603", "entity": "11", "state": 1, "tag": "506" } { "time": "2790250", "entity": "8", "state": 17 } { "time": "2791044", "entity": "50", "state": 1, "tag": "591" } { "state": 1, "tag": "50a", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2791330", "entity": "18", "state": 17 } { "state": 1, "tag": "3a3", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2793174", "entity": "12", "state": 1, "tag": "50b" } { "time": "2794514", "entity": "15", "state": 1, "tag": "50a" } { "state": 1, "tag": "586", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "332", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "1a1", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "431", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2795661", "entity": "52", "state": 1, "tag": "494" } { "time": "2795818", "entity": "24", "state": 1, "tag": "505" } { "time": "2795870", "entity": "50", "state": 3, "tag": "2" } { "time": "2796195", "entity": "32", "state": 17 } { "state": 1, "tag": "149", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2796791", "entity": "6", "state": 17 } { "time": "2796948", "entity": "31", "state": 1, "tag": "332" } { "time": "2796998", "entity": "47", "state": 0, "tag": "49a7f32" } { "state": 1, "tag": "2fc", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2797170", "entity": "20", "state": 17 } { "time": "2797844", "entity": "22", "state": 17 } { "time": "2798008", "entity": "13", "state": 1, "tag": "1a1" } { "time": "2798180", "entity": "46", "state": 1, "tag": "431" } { "state": 1, "tag": "53d", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2799503", "entity": "8", "state": 1, "tag": "149" } { "time": "2799946", "entity": "9", "state": 1, "tag": "586" } { "time": "2800495", "entity": "38", "state": 1, "tag": "3a3" } { "time": "2801241", "entity": "43", "state": 1, "tag": "53d" } { "time": "2801891", "entity": "50", "state": 1, "tag": "591" } { "time": "2802030", "entity": "28", "state": 1, "tag": "2fc" } { "time": "2802203", "entity": "11", "state": 17 } { "time": "2802513", "entity": "15", "state": 17 } { "time": "2804148", "entity": "22", "state": 0, "tag": "48d4e18" } { "time": "2804983", "entity": "12", "state": 17 } { "state": 1, "tag": "159", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "3c4", "thread": "zfs`dbuf_evict_thread", "taskq": "" } { "state": 1, "tag": "454", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2807716", "entity": "21", "state": 17 } { "state": 1, "tag": "532", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2809330", "entity": "46", "state": 1, "tag": "3c4" } { "time": "2809907", "entity": "9", "state": 1, "tag": "159" } { "time": "2809959", "entity": "48", "state": 1, "tag": "454" } { "state": 1, "tag": "401", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2812244", "entity": "22", "state": 17 } { "time": "2812381", "entity": "38", "state": 17 } { "time": "2812838", "entity": "50", "state": 1, "tag": "532" } { "state": 1, "tag": "441", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2813618", "entity": "43", "state": 1, "tag": "401" } { "time": "2813635", "entity": "24", "state": 17 } { "time": "2813655", "entity": "4", "state": 17 } { "state": 1, "tag": "201", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2816419", "entity": "31", "state": 17 } { "state": 1, "tag": "109", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "4f0", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 7, "tag": "ffffd062dbd3caa0", "driver": "ixgbe", "instance": 0 } { "time": "2817983", "entity": "13", "state": 17 } { "time": "2818893", "entity": "4", "state": 1, "tag": "109" } { "time": "2819739", "entity": "35", "state": 17 } { "state": 1, "tag": "56f", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2820521", "entity": "44", "state": 1, "tag": "4f0" } { "state": 1, "tag": "474", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2820846", "entity": "31", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "2821964", "entity": "4", "state": 17 } { "time": "2822271", "entity": "47", "state": 1, "tag": "441" } { "time": "2823215", "entity": "19", "state": 1, "tag": "201" } { "time": "2823281", "entity": "28", "state": 17 } { "time": "2823339", "entity": "50", "state": 1, "tag": "474" } { "time": "2824040", "entity": "22", "state": 1, "tag": "56f" } { "time": "2824727", "entity": "8", "state": 17 } { "time": "2825090", "entity": "20", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2826403", "entity": "35", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "2827341", "entity": "15", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2827641", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2828147", "entity": "31", "state": 17 } { "time": "2828240", "entity": "44", "state": 17 } { "time": "2828434", "entity": "48", "state": 17 } { "time": "2828810", "entity": "13", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2828928", "entity": "18", "state": 7, "tag": "ffffd062dbd3caa0" } { "state": 1, "tag": "231", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2831848", "entity": "32", "state": 7, "tag": "ffffd062dbcb7d58" } { "state": 1, "tag": "3b3", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2832759", "entity": "9", "state": 17 } { "time": "2833726", "entity": "22", "state": 1, "tag": "231" } { "time": "2834743", "entity": "39", "state": 1, "tag": "3b3" } { "time": "2834868", "entity": "52", "state": 17 } { "time": "2835340", "entity": "41", "state": 0, "tag": "497d212" } { "time": "2836018", "entity": "20", "state": 17 } { "time": "2836192", "entity": "15", "state": 17 } { "time": "2836248", "entity": "35", "state": 17 } { "time": "2836415", "entity": "19", "state": 0, "tag": "497e0d4" } { "time": "2837835", "entity": "22", "state": 17 } { "time": "2838427", "entity": "13", "state": 17 } { "state": 1, "tag": "55c", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "421", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2841934", "entity": "50", "state": 17 } { "time": "2842485", "entity": "16", "state": 17 } { "time": "2842632", "entity": "43", "state": 17 } { "time": "2842769", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "2843248", "entity": "32", "state": 17 } { "time": "2843749", "entity": "15", "state": 1, "tag": "55c" } { "time": "2844586", "entity": "18", "state": 17 } { "time": "2849706", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2850475", "entity": "23", "state": 17 } { "state": 1, "tag": "547", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2851926", "entity": "45", "state": 1, "tag": "421" } { "time": "2853387", "entity": "15", "state": 17 } { "state": 1, "tag": "139", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2854482", "entity": "18", "state": 1, "tag": "547" } { "time": "2857892", "entity": "27", "state": 17 } { "time": "2858407", "entity": "7", "state": 1, "tag": "139" } { "time": "2858890", "entity": "39", "state": 17 } { "time": "2861162", "entity": "18", "state": 17 } { "time": "2865228", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "2865239", "entity": "47", "state": 17 } { "time": "2874241", "entity": "20", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2877147", "entity": "20", "state": 17 } { "time": "2878100", "entity": "18", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2878417", "entity": "49", "state": 17 } { "time": "2880266", "entity": "13", "state": 7, "tag": "ffffd062dbd3caa0" } { "state": 1, "tag": "58a", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "48c0687", "thread": "mac`mac_srs_worker", "taskq": "" } { "time": "2881471", "entity": "7", "state": 17 } { "time": "2882394", "entity": "4", "state": 1, "tag": "58a" } { "time": "2882699", "entity": "18", "state": 17 } { "time": "2884819", "entity": "21", "state": 1, "tag": "48c0687" } { "time": "2885368", "entity": "13", "state": 17 } { "time": "2892650", "entity": "4", "state": 17 } { "state": 0, "tag": "497cdc5", "pid": "565220", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 1, "tag": "119", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2895882", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2896922", "entity": "21", "state": 17 } { "time": "2898855", "entity": "23", "state": 0, "tag": "497cdc5" } { "time": "2899081", "entity": "5", "state": 1, "tag": "119" } { "state": 1, "tag": "2", "driver": "softint", "instance": 0 } { "time": "2904722", "entity": "23", "state": 2, "tag": "1" } { "time": "2905416", "entity": "45", "state": 17 } { "state": 1, "tag": "353", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2908478", "entity": "23", "state": 0, "tag": "497cdc5" } { "time": "2909051", "entity": "53", "state": 17 } { "state": 1, "tag": "592", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2910797", "entity": "33", "state": 1, "tag": "353" } { "time": "2912119", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "2913138", "entity": "15", "state": 1, "tag": "592" } { "time": "2914211", "entity": "29", "state": 17 } { "time": "2918243", "entity": "1", "state": 17 } { "time": "2918569", "entity": "33", "state": 17 } { "state": 1, "tag": "4e9", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "245", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2921512", "entity": "15", "state": 17 } { "time": "2921746", "entity": "5", "state": 17 } { "time": "2923567", "entity": "52", "state": 2, "tag": "1" } { "time": "2923665", "entity": "23", "state": 1, "tag": "245" } { "time": "2923828", "entity": "29", "state": 1, "tag": "4e9" } { "time": "2924126", "entity": "36", "state": 17 } { "state": 1, "tag": "570", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2926812", "entity": "43", "state": 0, "tag": "48d4ced" } { "time": "2927055", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "2927485", "entity": "5", "state": 1, "tag": "570" } { "state": 1, "tag": "1b1", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "ae", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2930823", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2931655", "entity": "14", "state": 1, "tag": "1b1" } { "time": "2932169", "entity": "29", "state": 17 } { "time": "2933048", "entity": "15", "state": 17 } { "time": "2933676", "entity": "5", "state": 17 } { "state": 1, "tag": "343", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2934343", "entity": "1", "state": 1, "tag": "ae" } { "time": "2934772", "entity": "14", "state": 17 } { "time": "2936066", "entity": "32", "state": 1, "tag": "343" } { "time": "2936210", "entity": "26", "state": 17 } { "time": "2939460", "entity": "52", "state": 1, "tag": "494" } { "time": "2939597", "entity": "1", "state": 17 } { "time": "2940588", "entity": "32", "state": 17 } { "time": "2943613", "entity": "23", "state": 0, "tag": "497cdc5" } { "time": "2946897", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2954837", "entity": "30", "state": 17 } { "state": 1, "tag": "565", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2959792", "entity": "15", "state": 1, "tag": "565" } { "time": "2968711", "entity": "28", "state": 1, "tag": "2fc" } { "time": "2971712", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "2971952", "entity": "13", "state": 1, "tag": "1a1" } { "time": "2974959", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2982979", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "2983981", "entity": "34", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "2986129", "entity": "28", "state": 17 } { "time": "2990466", "entity": "16", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2994684", "entity": "34", "state": 17 } { "time": "2998520", "entity": "16", "state": 17 } { "time": "2999276", "entity": "18", "state": 0, "tag": "497cdd9" } { "time": "3000587", "entity": "13", "state": 17 } { "state": 1, "tag": "d7", "thread": "ip`squeue_worker", "taskq": "" } { "time": "3004848", "entity": "16", "state": 0, "tag": "497d20a" } { "time": "3004920", "entity": "2", "state": 1, "tag": "d7" } { "time": "3005728", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "3018074", "entity": "23", "state": 17 } { "time": "3019107", "entity": "2", "state": 17 } { "time": "3023591", "entity": "15", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "3023621", "entity": "10", "state": 17 } { "time": "3026750", "entity": "14", "state": 17 } { "time": "3029498", "entity": "38", "state": 0, "tag": "497cdd0" } { "time": "3029791", "entity": "11", "state": 17 } { "time": "3033399", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3034832", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "3042504", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "3050698", "entity": "15", "state": 17 } { "time": "3059843", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3067142", "entity": "14", "state": 17 } { "time": "3087009", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3091275", "entity": "36", "state": 17 } { "time": "3100875", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "3103179", "entity": "38", "state": 17 } { "time": "3112559", "entity": "38", "state": 0, "tag": "497cdd0" } { "time": "3130384", "entity": "49", "state": 17 } { "time": "3130852", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "3144079", "entity": "52", "state": 17 } { "time": "3148229", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3148920", "entity": "9", "state": 17 } { "time": "3152479", "entity": "43", "state": 17 } { "time": "3159520", "entity": "18", "state": 17 } { "time": "3163635", "entity": "18", "state": 0, "tag": "497cdd9" } { "time": "3164268", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3165294", "entity": "43", "state": 0, "tag": "48d4ced" } { "time": "3168555", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "3171006", "entity": "11", "state": 17 } { "state": 1, "tag": "3ecbe54", "thread": "mac`mac_srs_worker", "taskq": "" } { "time": "3183242", "entity": "52", "state": 17 } { "time": "3183692", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "3183796", "entity": "33", "state": 1, "tag": "3ecbe54" } { "time": "3186062", "entity": "26", "state": 17 } { "time": "3191125", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3193820", "entity": "33", "state": 17 } { "time": "3203137", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "3207620", "entity": "14", "state": 17 } { "time": "3208377", "entity": "11", "state": 17 } { "time": "3209779", "entity": "9", "state": 17 } { "time": "3228662", "entity": "15", "state": 17 } { "time": "3233904", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3239573", "entity": "1", "state": 0, "tag": "48d4e10" } { "time": "3242310", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3247045", "entity": "4", "state": 15 } { "time": "3249062", "entity": "4", "state": 17 } { "time": "3250489", "entity": "4", "state": 3, "tag": "2" } { "time": "3254343", "entity": "52", "state": 17 } { "time": "3254565", "entity": "4", "state": 17 } { "time": "3257853", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "3260479", "entity": "22", "state": 0, "tag": "48d4e18" } { "time": "3261954", "entity": "19", "state": 17 } { "time": "3266829", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3267804", "entity": "22", "state": 17 } { "time": "3270503", "entity": "4", "state": 16 } { "time": "3271940", "entity": "9", "state": 16 } { "time": "3272354", "entity": "15", "state": 16 } { "time": "3272791", "entity": "18", "state": 16 } { "time": "3272865", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "3273096", "entity": "52", "state": 16 } { "time": "3273281", "entity": "49", "state": 16 } { "time": "3274285", "entity": "17", "state": 16 } { "time": "3274728", "entity": "38", "state": 16 } { "time": "3277012", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3277370", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3277741", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "3278500", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3278837", "entity": "18", "state": 0, "tag": "497cdd9" } { "time": "3282801", "entity": "15", "state": 17 } { "time": "3283385", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "3284342", "entity": "38", "state": 0, "tag": "497cdd0" } { "time": "3296061", "entity": "9", "state": 17 } { "time": "3297797", "entity": "4", "state": 17 } { "time": "3306163", "entity": "18", "state": 17 } { "time": "3309408", "entity": "6", "state": 0, "tag": "497cdd9" } { "time": "3316172", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "3331918", "entity": "17", "state": 17 } { "time": "3339615", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "3340029", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3343966", "entity": "38", "state": 17 } { "time": "3347924", "entity": "49", "state": 17 } { "time": "3352143", "entity": "38", "state": 15 } { "time": "3352954", "entity": "4", "state": 17 } ================================================ FILE: tst/tst.tag_redefined.in ================================================ { "start": [ 1528482355, 856625707 ], "title": "Statemap for CPU activity on HA8S7MRD2", "host": "HA8S7MRD2", "entityKind": "CPU", "states": { "uthread": {"value": 0, "color": "#9BC362" }, "kthread": {"value": 1, "color": "#2E4E00" }, "level-1": {"value": 2, "color": "#689D99" }, "level-2": {"value": 3, "color": "#41837E" }, "level-3": {"value": 4, "color": "#236863" }, "level-4": {"value": 5, "color": "#0D4E4A" }, "level-5": {"value": 6, "color": "#003430" }, "level-6": {"value": 7, "color": "#817FB2" }, "level-7": {"value": 8, "color": "#575594" }, "level-8": {"value": 9, "color": "#363377" }, "level-9": {"value": 10, "color": "#1C1A59" }, "level-10": {"value": 11, "color": "#0A093B" }, "level-11": {"value": 12, "color": "#FFAAAA" }, "level-12": {"value": 13, "color": "#D46A6A" }, "level-13": {"value": 14, "color": "#AA3939" }, "level-14": {"value": 15, "color": "#801515" }, "level-15": {"value": 16, "color": "#550000" }, "idle": {"value": 17, "color": "#e0e0e0" } } } { "time": "133694", "entity": "14", "state": 17 } { "time": "133726", "entity": "0", "state": 17 } { "time": "133731", "entity": "8", "state": 17 } { "time": "133776", "entity": "12", "state": 17 } { "time": "133779", "entity": "28", "state": 17 } { "time": "133783", "entity": "20", "state": 17 } { "time": "133819", "entity": "18", "state": 17 } { "time": "133859", "entity": "5", "state": 17 } { "time": "133863", "entity": "22", "state": 17 } { "time": "133888", "entity": "11", "state": 17 } { "time": "133917", "entity": "7", "state": 17 } { "time": "133961", "entity": "3", "state": 17 } { "time": "133979", "entity": "21", "state": 17 } { "time": "134574", "entity": "9", "state": 17 } { "time": "135203", "entity": "35", "state": 17 } { "time": "136037", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "136389", "entity": "31", "state": 17 } { "time": "136724", "entity": "17", "state": 17 } { "time": "137094", "entity": "40", "state": 17 } { "time": "137133", "entity": "46", "state": 17 } { "time": "137348", "entity": "13", "state": 17 } { "time": "137701", "entity": "6", "state": 17 } { "time": "138148", "entity": "29", "state": 17 } { "time": "138234", "entity": "1", "state": 17 } { "time": "138244", "entity": "44", "state": 17 } { "time": "139739", "entity": "41", "state": 0, "tag": "49a7f3e" } { "time": "139979", "entity": "37", "state": 17 } { "time": "141144", "entity": "25", "state": 17 } { "time": "141240", "entity": "53", "state": 17 } { "time": "141384", "entity": "32", "state": 17 } { "time": "141553", "entity": "39", "state": 17 } { "time": "141598", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "141960", "entity": "55", "state": 17 } { "time": "141978", "entity": "27", "state": 17 } { "time": "142181", "entity": "10", "state": 17 } { "time": "142336", "entity": "28", "state": 15 } { "time": "142496", "entity": "51", "state": 17 } { "time": "142744", "entity": "23", "state": 17 } { "time": "143454", "entity": "19", "state": 17 } { "time": "143551", "entity": "47", "state": 17 } { "time": "143638", "entity": "30", "state": 17 } { "time": "144457", "entity": "33", "state": 17 } { "time": "144680", "entity": "43", "state": 17 } { "time": "144739", "entity": "15", "state": 17 } { "time": "144784", "entity": "36", "state": 17 } { "time": "145279", "entity": "50", "state": 17 } { "time": "145292", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "145567", "entity": "42", "state": 17 } { "time": "146407", "entity": "48", "state": 1, "tag": "3c4" } { "time": "148558", "entity": "34", "state": 17 } { "time": "148758", "entity": "38", "state": 17 } { "time": "149461", "entity": "26", "state": 17 } { "time": "149464", "entity": "54", "state": 17 } { "time": "149917", "entity": "28", "state": 17 } { "time": "151111", "entity": "24", "state": 17 } { "state": 2, "tag": "3", "driver": "softint", "instance": 0 } { "time": "151161", "entity": "52", "state": 17 } { "time": "158287", "entity": "28", "state": 3, "tag": "2" } { "time": "159063", "entity": "49", "state": 17 } { "state": 0, "tag": "4a0e384", "pid": "50378", "tid": "1", "execname": "dtrace", "psargs": "/usr/sbin/dtrace -Cs ./postgres-statemap-zfs.d" } { "time": "170534", "entity": "28", "state": 17 } { "time": "173279", "entity": "0", "state": 0, "tag": "4a0e384" } { "state": 0, "tag": "49a7f42", "pid": "565192", "tid": "66", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "184732", "entity": "28", "state": 0, "tag": "49a7f42" } { "time": "198289", "entity": "4", "state": 17 } { "state": 0, "tag": "49a7f49", "pid": "565192", "tid": "74", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "215317", "entity": "4", "state": 0, "tag": "49a7f49" } { "state": 0, "tag": "497cdd3", "pid": "565192", "tid": "19", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "236759", "entity": "28", "state": 17 } { "time": "240371", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "245952", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "251572", "entity": "52", "state": 15 } { "time": "256407", "entity": "4", "state": 17 } { "time": "257895", "entity": "52", "state": 17 } { "time": "263286", "entity": "52", "state": 3, "tag": "2" } { "time": "273170", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "275226", "entity": "52", "state": 17 } { "state": 0, "tag": "49a7f45", "pid": "565192", "tid": "70", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f32", "pid": "565192", "tid": "51", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "296823", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "298706", "entity": "0", "state": 16 } { "time": "299990", "entity": "19", "state": 0, "tag": "49a7f32" } { "state": 0, "tag": "49a7f46", "pid": "565192", "tid": "71", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "303706", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "307335", "entity": "31", "state": 0, "tag": "49a7f46" } { "state": 0, "tag": "497cdd0", "pid": "565192", "tid": "16", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "4a0e388", "pid": "50380", "tid": "1", "execname": "pg_xlogdump", "psargs": "/opt/postgresql/current/bin/pg_xlogdump -f /manatee/pg/data/pg_xlog/00000001000" } { "time": "311412", "entity": "4", "state": 17 } { "time": "312858", "entity": "36", "state": 17 } { "time": "315103", "entity": "1", "state": 16 } { "time": "315435", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "320596", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "323738", "entity": "1", "state": 17 } { "time": "324471", "entity": "41", "state": 17 } { "time": "327464", "entity": "2", "state": 16 } { "state": 0, "tag": "49a7f3e", "pid": "565192", "tid": "63", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "330894", "entity": "2", "state": 17 } { "time": "333404", "entity": "41", "state": 0, "tag": "49a7f3e" } { "time": "335503", "entity": "3", "state": 16 } { "time": "341680", "entity": "3", "state": 17 } { "time": "344099", "entity": "4", "state": 16 } { "time": "347527", "entity": "45", "state": 17 } { "time": "347942", "entity": "4", "state": 17 } { "time": "351280", "entity": "5", "state": 16 } { "state": 0, "tag": "49a7f2e", "pid": "565192", "tid": "47", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "355510", "entity": "5", "state": 17 } { "time": "357571", "entity": "19", "state": 17 } { "time": "359891", "entity": "6", "state": 16 } { "time": "360586", "entity": "49", "state": 17 } { "time": "365971", "entity": "6", "state": 17 } { "time": "367461", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "368755", "entity": "7", "state": 16 } { "time": "368815", "entity": "31", "state": 16 } { "time": "369961", "entity": "10", "state": 16 } { "time": "370707", "entity": "52", "state": 16 } { "time": "371639", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "372586", "entity": "7", "state": 17 } { "time": "372850", "entity": "14", "state": 17 } { "time": "373621", "entity": "45", "state": 16 } { "time": "375707", "entity": "8", "state": 16 } { "time": "377134", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "377401", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "379466", "entity": "8", "state": 17 } { "time": "380914", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "413422", "entity": "31", "state": 17 } { "time": "449800", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "450431", "entity": "49", "state": 0, "tag": "497cdd3" } { "state": 7, "tag": "ffffd062dbcb7d58", "driver": "ixgbe", "instance": 2 } { "time": "468924", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "469468", "entity": "30", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "470025", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "471607", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "477875", "entity": "10", "state": 17 } { "time": "484799", "entity": "10", "state": 0, "tag": "497cdd0" } { "state": 0, "tag": "497cdd1", "pid": "565192", "tid": "17", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "485897", "entity": "4", "state": 17 } { "time": "491362", "entity": "31", "state": 17 } { "time": "491825", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "492884", "entity": "30", "state": 17 } { "time": "496488", "entity": "31", "state": 0, "tag": "49a7f46" } { "state": 0, "tag": "48d4b6d", "pid": "5447", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "503227", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "503832", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "506328", "entity": "11", "state": 17 } { "time": "509977", "entity": "11", "state": 0, "tag": "497cdd1" } { "state": 0, "tag": "497cdd4", "pid": "565192", "tid": "20", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "523775", "entity": "22", "state": 0, "tag": "497cdd4" } { "state": 0, "tag": "497cd9f", "pid": "565192", "tid": "1", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "532235", "entity": "53", "state": 0, "tag": "497cd9f" } { "state": 0, "tag": "4980fc2", "pid": "565192", "tid": "27", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "497cdd9", "pid": "565192", "tid": "24", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "time": "542614", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "546541", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "547085", "entity": "41", "state": 17 } { "time": "549434", "entity": "11", "state": 17 } { "time": "555295", "entity": "49", "state": 17 } { "state": 0, "tag": "48d4b75", "pid": "5447", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "557568", "entity": "4", "state": 17 } { "time": "558415", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "559789", "entity": "53", "state": 17 } { "time": "564353", "entity": "8", "state": 0, "tag": "48d4b75" } { "time": "573039", "entity": "9", "state": 17 } { "time": "576830", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "578248", "entity": "46", "state": 17 } { "time": "586259", "entity": "8", "state": 17 } { "time": "586378", "entity": "36", "state": 17 } { "time": "591726", "entity": "49", "state": 17 } { "time": "594180", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "606345", "entity": "31", "state": 17 } { "time": "609029", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "615014", "entity": "53", "state": 17 } { "time": "623515", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "635285", "entity": "45", "state": 17 } { "time": "641951", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "642296", "entity": "31", "state": 17 } { "time": "657898", "entity": "53", "state": 17 } { "time": "658525", "entity": "52", "state": 17 } { "time": "664378", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "668175", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "669848", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "671815", "entity": "22", "state": 17 } { "time": "689085", "entity": "10", "state": 17 } { "time": "696634", "entity": "49", "state": 17 } { "time": "697889", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "699569", "entity": "19", "state": 17 } { "time": "703265", "entity": "14", "state": 17 } { "time": "718505", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "728522", "entity": "52", "state": 17 } { "time": "735026", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "736636", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "739400", "entity": "0", "state": 15 } { "time": "743280", "entity": "0", "state": 0, "tag": "4a0e384" } { "state": 10, "tag": "b", "driver": "softint", "instance": 0 } { "time": "747031", "entity": "0", "state": 11, "tag": "a" } { "time": "752452", "entity": "10", "state": 17 } { "time": "752901", "entity": "53", "state": 17 } { "time": "753787", "entity": "49", "state": 17 } { "time": "754077", "entity": "16", "state": 17 } { "time": "762849", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "767901", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "775953", "entity": "19", "state": 17 } { "time": "785696", "entity": "49", "state": 17 } { "time": "786067", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "838177", "entity": "45", "state": 17 } { "time": "901231", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "923069", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "927589", "entity": "19", "state": 17 } { "time": "938479", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "947220", "entity": "31", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "961419", "entity": "45", "state": 17 } { "time": "966595", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "975225", "entity": "31", "state": 17 } { "state": 0, "tag": "48d4ade", "pid": "5336", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "983732", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "988698", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1006460", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1018551", "entity": "49", "state": 17 } { "time": "1020723", "entity": "53", "state": 17 } { "time": "1025056", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1029210", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1031701", "entity": "14", "state": 0, "tag": "4a0e388" } { "state": 0, "tag": "48d4ae8", "pid": "5336", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "time": "1040160", "entity": "52", "state": 17 } { "time": "1045495", "entity": "21", "state": 0, "tag": "48d4ae8" } { "time": "1053860", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1056323", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1063767", "entity": "21", "state": 17 } { "time": "1064227", "entity": "10", "state": 17 } { "time": "1070591", "entity": "14", "state": 17 } { "time": "1076581", "entity": "49", "state": 17 } { "time": "1076899", "entity": "53", "state": 17 } { "time": "1079487", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1085729", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1104374", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1113664", "entity": "52", "state": 17 } { "time": "1117162", "entity": "53", "state": 17 } { "time": "1119151", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1119914", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1123006", "entity": "49", "state": 17 } { "state": 0, "tag": "4a0e383", "pid": "50377", "tid": "1", "execname": "dtrace", "psargs": "/usr/sbin/dtrace -Cs ./cpu-statemap-tagged.d" } { "time": "1128525", "entity": "16", "state": 0, "tag": "4a0e383" } { "time": "1133011", "entity": "9", "state": 16 } { "time": "1137190", "entity": "9", "state": 17 } { "time": "1137845", "entity": "10", "state": 17 } { "time": "1143092", "entity": "10", "state": 16 } { "time": "1149172", "entity": "10", "state": 17 } { "time": "1151888", "entity": "11", "state": 16 } { "time": "1153362", "entity": "45", "state": 17 } { "time": "1154832", "entity": "52", "state": 17 } { "time": "1156133", "entity": "11", "state": 17 } { "time": "1156908", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1159816", "entity": "12", "state": 16 } { "time": "1160547", "entity": "30", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "1162840", "entity": "12", "state": 17 } { "time": "1166278", "entity": "19", "state": 17 } { "time": "1166405", "entity": "13", "state": 16 } { "time": "1170340", "entity": "22", "state": 17 } { "time": "1171318", "entity": "13", "state": 17 } { "time": "1173640", "entity": "30", "state": 17 } { "time": "1173786", "entity": "14", "state": 16 } { "time": "1177357", "entity": "14", "state": 17 } { "state": 0, "tag": "48d4ced", "pid": "5737", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2023 -k 3023" } { "time": "1184808", "entity": "15", "state": 0, "tag": "48d4ced" } { "time": "1188092", "entity": "15", "state": 16 } { "time": "1192735", "entity": "15", "state": 0, "tag": "48d4ced" } { "time": "1201969", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1205236", "entity": "17", "state": 16 } { "time": "1213509", "entity": "17", "state": 17 } { "time": "1214693", "entity": "18", "state": 16 } { "time": "1217933", "entity": "31", "state": 17 } { "time": "1218025", "entity": "18", "state": 17 } { "time": "1222783", "entity": "19", "state": 16 } { "time": "1223052", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1231369", "entity": "19", "state": 17 } { "time": "1234496", "entity": "20", "state": 16 } { "state": 0, "tag": "48d4d00", "pid": "5737", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2023 -k 3023" } { "time": "1239245", "entity": "20", "state": 17 } { "time": "1239831", "entity": "22", "state": 17 } { "time": "1240063", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "1241645", "entity": "21", "state": 16 } { "time": "1242848", "entity": "41", "state": 0, "tag": "48d4d00" } { "time": "1247578", "entity": "21", "state": 17 } { "time": "1250339", "entity": "22", "state": 16 } { "time": "1254272", "entity": "22", "state": 17 } { "time": "1254559", "entity": "41", "state": 17 } { "time": "1256915", "entity": "23", "state": 16 } { "time": "1261109", "entity": "23", "state": 17 } { "time": "1264991", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1265886", "entity": "24", "state": 16 } { "state": 0, "tag": "497d20a", "pid": "566150", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "1274130", "entity": "24", "state": 17 } { "time": "1275439", "entity": "25", "state": 16 } { "time": "1278104", "entity": "2", "state": 0, "tag": "497d20a" } { "time": "1280783", "entity": "25", "state": 17 } { "time": "1284410", "entity": "26", "state": 16 } { "time": "1285340", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1290577", "entity": "26", "state": 17 } { "time": "1293829", "entity": "27", "state": 16 } { "time": "1299840", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "1301420", "entity": "22", "state": 17 } { "time": "1302605", "entity": "28", "state": 16 } { "time": "1305409", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1307933", "entity": "28", "state": 17 } { "time": "1311223", "entity": "29", "state": 16 } { "time": "1318349", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "1320548", "entity": "30", "state": 16 } { "time": "1324450", "entity": "30", "state": 17 } { "time": "1326355", "entity": "31", "state": 17 } { "time": "1328330", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1328586", "entity": "22", "state": 17 } { "time": "1328695", "entity": "31", "state": 16 } { "time": "1332677", "entity": "31", "state": 17 } { "time": "1336344", "entity": "32", "state": 16 } { "time": "1340039", "entity": "32", "state": 17 } { "time": "1342203", "entity": "33", "state": 16 } { "time": "1345521", "entity": "33", "state": 17 } { "time": "1349615", "entity": "34", "state": 16 } { "time": "1354008", "entity": "34", "state": 17 } { "time": "1356043", "entity": "35", "state": 16 } { "time": "1359384", "entity": "35", "state": 17 } { "time": "1361625", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1362681", "entity": "36", "state": 16 } { "time": "1366323", "entity": "36", "state": 17 } { "time": "1367733", "entity": "30", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "1369031", "entity": "45", "state": 17 } { "time": "1369266", "entity": "37", "state": 16 } { "time": "1372514", "entity": "37", "state": 17 } { "time": "1378625", "entity": "38", "state": 16 } { "time": "1379993", "entity": "2", "state": 17 } { "time": "1386771", "entity": "30", "state": 17 } { "time": "1387798", "entity": "38", "state": 17 } { "time": "1387821", "entity": "22", "state": 17 } { "time": "1388067", "entity": "39", "state": 16 } { "time": "1388228", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1391467", "entity": "39", "state": 17 } { "time": "1393949", "entity": "40", "state": 16 } { "time": "1395988", "entity": "40", "state": 17 } { "time": "1399028", "entity": "41", "state": 16 } { "time": "1402723", "entity": "41", "state": 17 } { "time": "1406240", "entity": "42", "state": 16 } { "time": "1408563", "entity": "42", "state": 17 } { "time": "1412926", "entity": "43", "state": 16 } { "time": "1418481", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1418781", "entity": "43", "state": 17 } { "time": "1421034", "entity": "44", "state": 16 } { "time": "1424874", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "1424927", "entity": "44", "state": 17 } { "time": "1428749", "entity": "45", "state": 16 } { "time": "1431809", "entity": "10", "state": 17 } { "time": "1436972", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1438380", "entity": "46", "state": 16 } { "time": "1440527", "entity": "46", "state": 17 } { "time": "1444400", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1448049", "entity": "47", "state": 16 } { "time": "1449582", "entity": "10", "state": 0, "tag": "497cdd0" } { "state": 0, "tag": "497d212", "pid": "566158", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "1456559", "entity": "37", "state": 0, "tag": "497d212" } { "time": "1458812", "entity": "47", "state": 17 } { "time": "1459196", "entity": "19", "state": 17 } { "time": "1459808", "entity": "48", "state": 16 } { "time": "1460858", "entity": "14", "state": 17 } { "time": "1462700", "entity": "22", "state": 17 } { "time": "1463447", "entity": "48", "state": 1, "tag": "3c4" } { "time": "1466417", "entity": "49", "state": 16 } { "time": "1469928", "entity": "49", "state": 17 } { "time": "1475559", "entity": "50", "state": 16 } { "time": "1476464", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1480197", "entity": "50", "state": 17 } { "state": 0, "tag": "48d4e10", "pid": "5958", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2024 -k 3024" } { "time": "1481808", "entity": "51", "state": 16 } { "time": "1484985", "entity": "51", "state": 17 } { "time": "1490063", "entity": "52", "state": 16 } { "time": "1491640", "entity": "45", "state": 0, "tag": "48d4e10" } { "time": "1498337", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1499681", "entity": "53", "state": 16 } { "time": "1503542", "entity": "53", "state": 17 } { "time": "1507553", "entity": "54", "state": 16 } { "time": "1507610", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1511913", "entity": "54", "state": 17 } { "time": "1514247", "entity": "10", "state": 17 } { "time": "1515873", "entity": "55", "state": 16 } { "time": "1520140", "entity": "22", "state": 17 } { "time": "1522315", "entity": "55", "state": 17 } { "time": "1527856", "entity": "27", "state": 17 } { "time": "1531660", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1540257", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1550117", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "1557017", "entity": "31", "state": 17 } { "time": "1563796", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "1566090", "entity": "22", "state": 17 } { "time": "1566148", "entity": "45", "state": 0, "tag": "48d4e10" } { "time": "1566354", "entity": "52", "state": 17 } { "time": "1568814", "entity": "2", "state": 0, "tag": "497d20a" } { "time": "1570616", "entity": "9", "state": 15 } { "time": "1571878", "entity": "46", "state": 15 } { "time": "1573357", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1573496", "entity": "46", "state": 17 } { "time": "1574862", "entity": "9", "state": 17 } { "time": "1576428", "entity": "46", "state": 3, "tag": "2" } { "time": "1576608", "entity": "37", "state": 17 } { "time": "1578950", "entity": "8", "state": 15 } { "time": "1579862", "entity": "9", "state": 3, "tag": "2" } { "time": "1581274", "entity": "8", "state": 17 } { "time": "1582362", "entity": "46", "state": 17 } { "time": "1584227", "entity": "8", "state": 3, "tag": "2" } { "time": "1586328", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1590277", "entity": "8", "state": 17 } { "time": "1590464", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1590591", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1591543", "entity": "9", "state": 17 } { "time": "1594956", "entity": "8", "state": 0, "tag": "48d4b75" } { "time": "1600794", "entity": "29", "state": 17 } { "time": "1601223", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "1601876", "entity": "8", "state": 17 } { "time": "1602851", "entity": "22", "state": 17 } { "time": "1612606", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1619928", "entity": "10", "state": 17 } { "time": "1621241", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1622825", "entity": "9", "state": 17 } { "time": "1625312", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1639370", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "1640702", "entity": "31", "state": 17 } { "time": "1678850", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1680520", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1692340", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1694963", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "1700982", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "1706068", "entity": "46", "state": 0, "tag": "48d4e10" } { "time": "1713100", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1717396", "entity": "31", "state": 17 } { "time": "1718374", "entity": "1", "state": 0, "tag": "48d4e10" } { "time": "1721948", "entity": "9", "state": 16 } { "time": "1722376", "entity": "22", "state": 16 } { "time": "1722398", "entity": "36", "state": 16 } { "time": "1722545", "entity": "46", "state": 16 } { "time": "1723026", "entity": "10", "state": 16 } { "time": "1723152", "entity": "49", "state": 16 } { "time": "1723829", "entity": "53", "state": 16 } { "time": "1723893", "entity": "19", "state": 16 } { "time": "1724110", "entity": "45", "state": 16 } { "time": "1724830", "entity": "52", "state": 16 } { "time": "1725469", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1725641", "entity": "49", "state": 17 } { "time": "1725958", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "1726469", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "1726734", "entity": "22", "state": 0, "tag": "497cdd4" } { "time": "1727245", "entity": "53", "state": 0, "tag": "497cd9f" } { "time": "1727648", "entity": "37", "state": 0, "tag": "497d212" } { "time": "1727681", "entity": "49", "state": 17 } { "time": "1730123", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1730633", "entity": "19", "state": 0, "tag": "49a7f32" } { "time": "1731250", "entity": "45", "state": 0, "tag": "49a7f2e" } { "time": "1731403", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1732151", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1739845", "entity": "0", "state": 15 } { "time": "1746589", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "1749918", "entity": "0", "state": 11, "tag": "a" } { "time": "1751913", "entity": "31", "state": 0, "tag": "49a7f46" } { "time": "1752389", "entity": "27", "state": 17 } { "state": 0, "tag": "497d4e2", "pid": "566865", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "1755671", "entity": "36", "state": 17 } { "time": "1758552", "entity": "36", "state": 0, "tag": "49a7f42" } { "state": 0, "tag": "48d4e18", "pid": "5958", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2024 -k 3024" } { "time": "1767581", "entity": "50", "state": 0, "tag": "48d4e18" } { "time": "1767920", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "1768630", "entity": "19", "state": 17 } { "time": "1774944", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "1776434", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "1778474", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "1783434", "entity": "11", "state": 17 } { "time": "1785617", "entity": "15", "state": 17 } { "time": "1789972", "entity": "50", "state": 17 } { "time": "1790371", "entity": "31", "state": 17 } { "time": "1798662", "entity": "22", "state": 17 } { "time": "1799659", "entity": "53", "state": 17 } { "time": "1799775", "entity": "49", "state": 17 } { "time": "1800147", "entity": "45", "state": 17 } { "time": "1802644", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "1804234", "entity": "9", "state": 17 } { "time": "1804314", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "1815421", "entity": "52", "state": 17 } { "time": "1831927", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "1842650", "entity": "49", "state": 17 } { "time": "1853453", "entity": "46", "state": 17 } { "time": "1854478", "entity": "47", "state": 17 } { "time": "1857286", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1857662", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "1860962", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "1861543", "entity": "36", "state": 17 } { "time": "1863742", "entity": "4", "state": 17 } { "time": "1865505", "entity": "17", "state": 17 } { "time": "1866888", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "1868188", "entity": "46", "state": 17 } { "time": "1885355", "entity": "10", "state": 17 } { "time": "1891052", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "1908947", "entity": "14", "state": 17 } { "time": "1928141", "entity": "46", "state": 0, "tag": "497cdd9" } { "time": "1973538", "entity": "4", "state": 17 } { "time": "2013125", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "2027694", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2034820", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "2051826", "entity": "46", "state": 17 } { "time": "2057896", "entity": "21", "state": 15 } { "time": "2060651", "entity": "36", "state": 17 } { "time": "2061335", "entity": "21", "state": 17 } { "time": "2063578", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2064235", "entity": "21", "state": 3, "tag": "2" } { "time": "2068218", "entity": "4", "state": 17 } { "time": "2070666", "entity": "21", "state": 17 } { "time": "2076440", "entity": "21", "state": 0, "tag": "48d4ae8" } { "time": "2084643", "entity": "21", "state": 17 } { "time": "2088885", "entity": "47", "state": 17 } { "time": "2095628", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2105539", "entity": "36", "state": 17 } { "time": "2166276", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2201863", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "2228637", "entity": "4", "state": 17 } { "time": "2231212", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "2249903", "entity": "4", "state": 17 } { "time": "2251762", "entity": "41", "state": 15 } { "time": "2253203", "entity": "41", "state": 17 } { "time": "2255393", "entity": "41", "state": 3, "tag": "2" } { "time": "2260551", "entity": "41", "state": 17 } { "time": "2264500", "entity": "41", "state": 0, "tag": "48d4d00" } { "time": "2269824", "entity": "41", "state": 17 } { "time": "2284834", "entity": "10", "state": 17 } { "time": "2291061", "entity": "52", "state": 17 } { "time": "2301592", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "2305757", "entity": "2", "state": 17 } { "state": 0, "tag": "497e0d4", "pid": "569380", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "time": "2322704", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2323720", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "2327364", "entity": "19", "state": 0, "tag": "497e0d4" } { "time": "2327891", "entity": "36", "state": 17 } { "time": "2336478", "entity": "38", "state": 0, "tag": "48d4b75" } { "time": "2350895", "entity": "1", "state": 17 } { "time": "2360872", "entity": "38", "state": 17 } { "time": "2362577", "entity": "14", "state": 17 } { "time": "2373219", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2401842", "entity": "10", "state": 0, "tag": "497cdd0" } { "time": "2410496", "entity": "52", "state": 17 } { "time": "2410586", "entity": "47", "state": 17 } { "time": "2445800", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2446541", "entity": "27", "state": 0, "tag": "48d4ade" } { "time": "2447611", "entity": "16", "state": 17 } { "time": "2458415", "entity": "37", "state": 17 } { "time": "2461516", "entity": "21", "state": 0, "tag": "48d4ae8" } { "time": "2467039", "entity": "21", "state": 17 } { "time": "2484067", "entity": "36", "state": 17 } { "time": "2484984", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2487284", "entity": "52", "state": 17 } { "time": "2491074", "entity": "2", "state": 0, "tag": "497d20a" } { "time": "2511956", "entity": "2", "state": 17 } { "time": "2530247", "entity": "15", "state": 0, "tag": "48d4ced" } { "time": "2546597", "entity": "41", "state": 0, "tag": "48d4d00" } { "time": "2551849", "entity": "41", "state": 17 } { "time": "2553991", "entity": "26", "state": 17 } { "time": "2598265", "entity": "37", "state": 0, "tag": "497d212" } { "time": "2612822", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2616846", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "2618688", "entity": "37", "state": 17 } { "time": "2624719", "entity": "10", "state": 17 } { "time": "2628302", "entity": "17", "state": 17 } { "time": "2652173", "entity": "14", "state": 17 } { "time": "2698733", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "2713062", "entity": "15", "state": 17 } { "time": "2718744", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "2738856", "entity": "11", "state": 15 } { "time": "2739184", "entity": "53", "state": 15 } { "time": "2739223", "entity": "13", "state": 15 } { "time": "2739227", "entity": "33", "state": 15 } { "time": "2739356", "entity": "35", "state": 15 } { "time": "2739437", "entity": "0", "state": 15 } { "time": "2739444", "entity": "22", "state": 15 } { "time": "2739524", "entity": "23", "state": 15 } { "time": "2739527", "entity": "12", "state": 15 } { "time": "2739800", "entity": "21", "state": 15 } { "time": "2739816", "entity": "36", "state": 15 } { "time": "2739819", "entity": "49", "state": 15 } { "time": "2739830", "entity": "14", "state": 15 } { "time": "2739847", "entity": "48", "state": 15 } { "time": "2739980", "entity": "15", "state": 15 } { "time": "2740110", "entity": "16", "state": 15 } { "time": "2740137", "entity": "37", "state": 15 } { "time": "2740149", "entity": "4", "state": 15 } { "time": "2740488", "entity": "30", "state": 15 } { "time": "2740512", "entity": "32", "state": 15 } { "time": "2740623", "entity": "11", "state": 17 } { "time": "2740924", "entity": "52", "state": 15 } { "time": "2741143", "entity": "1", "state": 15 } { "time": "2741149", "entity": "29", "state": 15 } { "time": "2741154", "entity": "10", "state": 15 } { "time": "2741427", "entity": "26", "state": 15 } { "time": "2741623", "entity": "33", "state": 17 } { "time": "2741668", "entity": "53", "state": 17 } { "time": "2741898", "entity": "12", "state": 17 } { "time": "2742244", "entity": "13", "state": 17 } { "time": "2742964", "entity": "21", "state": 17 } { "time": "2743620", "entity": "23", "state": 17 } { "time": "2743646", "entity": "49", "state": 17 } { "time": "2743658", "entity": "35", "state": 17 } { "time": "2743684", "entity": "11", "state": 11, "tag": "a" } { "time": "2743960", "entity": "22", "state": 17 } { "time": "2744663", "entity": "33", "state": 11, "tag": "a" } { "time": "2744680", "entity": "53", "state": 11, "tag": "a" } { "time": "2744789", "entity": "14", "state": 17 } { "time": "2744980", "entity": "47", "state": 15 } { "time": "2745068", "entity": "12", "state": 11, "tag": "a" } { "time": "2745110", "entity": "36", "state": 17 } { "time": "2745119", "entity": "15", "state": 17 } { "time": "2745444", "entity": "21", "state": 11, "tag": "a" } { "time": "2745609", "entity": "13", "state": 11, "tag": "a" } { "time": "2745804", "entity": "48", "state": 1, "tag": "3c4" } { "time": "2746183", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "2746302", "entity": "37", "state": 17 } { "time": "2746306", "entity": "49", "state": 11, "tag": "a" } { "time": "2746344", "entity": "16", "state": 17 } { "time": "2746428", "entity": "23", "state": 11, "tag": "a" } { "time": "2746493", "entity": "4", "state": 17 } { "time": "2746496", "entity": "30", "state": 17 } { "time": "2746569", "entity": "35", "state": 11, "tag": "a" } { "time": "2746608", "entity": "32", "state": 17 } { "time": "2747310", "entity": "22", "state": 11, "tag": "a" } { "time": "2747848", "entity": "14", "state": 11, "tag": "a" } { "time": "2748202", "entity": "1", "state": 17 } { "time": "2748519", "entity": "0", "state": 11, "tag": "a" } { "time": "2748767", "entity": "15", "state": 11, "tag": "a" } { "time": "2748842", "entity": "36", "state": 11, "tag": "a" } { "time": "2748989", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "2749477", "entity": "10", "state": 17 } { "time": "2749892", "entity": "30", "state": 11, "tag": "a" } { "time": "2749933", "entity": "16", "state": 11, "tag": "a" } { "time": "2750103", "entity": "48", "state": 11, "tag": "a" } { "time": "2750214", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2750477", "entity": "4", "state": 11, "tag": "a" } { "time": "2750480", "entity": "32", "state": 11, "tag": "a" } { "time": "2750619", "entity": "37", "state": 11, "tag": "a" } { "time": "2751894", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "2752222", "entity": "12", "state": 17 } { "time": "2753033", "entity": "29", "state": 11, "tag": "a" } { "time": "2753036", "entity": "1", "state": 11, "tag": "a" } { "time": "2753619", "entity": "33", "state": 17 } { "time": "2754750", "entity": "11", "state": 17 } { "time": "2756235", "entity": "14", "state": 17 } { "time": "2756564", "entity": "52", "state": 11, "tag": "a" } { "time": "2756724", "entity": "10", "state": 11, "tag": "a" } { "time": "2757240", "entity": "37", "state": 17 } { "time": "2757510", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2758979", "entity": "16", "state": 17 } { "time": "2758984", "entity": "26", "state": 11, "tag": "a" } { "state": 1, "tag": "508", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2762129", "entity": "0", "state": 0, "tag": "4a0e384" } { "time": "2763958", "entity": "29", "state": 0, "tag": "48d4b6d" } { "time": "2763992", "entity": "0", "state": 3, "tag": "2" } { "time": "2764529", "entity": "48", "state": 1, "tag": "3c4" } { "state": 1, "tag": "506", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "56b", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2765826", "entity": "0", "state": 0, "tag": "4a0e384" } { "state": 1, "tag": "50c", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2766634", "entity": "47", "state": 11, "tag": "a" } { "time": "2769168", "entity": "8", "state": 1, "tag": "508" } { "time": "2769369", "entity": "15", "state": 17 } { "time": "2769781", "entity": "16", "state": 1, "tag": "56b" } { "time": "2770167", "entity": "50", "state": 1, "tag": "50c" } { "time": "2770906", "entity": "11", "state": 1, "tag": "506" } { "state": 1, "tag": "572", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2775305", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2775728", "entity": "10", "state": 17 } { "state": 1, "tag": "589", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "511", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2778446", "entity": "32", "state": 17 } { "state": 1, "tag": "563", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "588", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2779948", "entity": "6", "state": 1, "tag": "572" } { "time": "2781106", "entity": "11", "state": 15 } { "state": 1, "tag": "50f", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "591", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2781550", "entity": "18", "state": 1, "tag": "589" } { "time": "2782610", "entity": "31", "state": 1, "tag": "563" } { "time": "2782633", "entity": "8", "state": 1, "tag": "588" } { "time": "2783057", "entity": "11", "state": 1, "tag": "506" } { "time": "2783200", "entity": "20", "state": 1, "tag": "511" } { "time": "2784164", "entity": "50", "state": 1, "tag": "591" } { "state": 1, "tag": "568", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2785196", "entity": "11", "state": 3, "tag": "2" } { "state": 1, "tag": "505", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2786380", "entity": "43", "state": 1, "tag": "50f" } { "time": "2786979", "entity": "50", "state": 15 } { "time": "2787490", "entity": "13", "state": 17 } { "time": "2787981", "entity": "10", "state": 0, "tag": "497cdd0" } { "state": 1, "tag": "494", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2789225", "entity": "32", "state": 1, "tag": "568" } { "state": 1, "tag": "50b", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2789603", "entity": "11", "state": 1, "tag": "506" } { "time": "2790250", "entity": "8", "state": 17 } { "time": "2791044", "entity": "50", "state": 1, "tag": "591" } { "state": 1, "tag": "50a", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2791330", "entity": "18", "state": 17 } { "state": 1, "tag": "3a3", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2793174", "entity": "12", "state": 1, "tag": "50b" } { "time": "2794514", "entity": "15", "state": 1, "tag": "50a" } { "state": 1, "tag": "586", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "332", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "1a1", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "431", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2795661", "entity": "52", "state": 1, "tag": "494" } { "time": "2795818", "entity": "24", "state": 1, "tag": "505" } { "time": "2795870", "entity": "50", "state": 3, "tag": "2" } { "time": "2796195", "entity": "32", "state": 17 } { "state": 1, "tag": "149", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2796791", "entity": "6", "state": 17 } { "time": "2796948", "entity": "31", "state": 1, "tag": "332" } { "time": "2796998", "entity": "47", "state": 0, "tag": "49a7f32" } { "state": 1, "tag": "2fc", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2797170", "entity": "20", "state": 17 } { "time": "2797844", "entity": "22", "state": 17 } { "time": "2798008", "entity": "13", "state": 1, "tag": "1a1" } { "time": "2798180", "entity": "46", "state": 1, "tag": "431" } { "state": 1, "tag": "53d", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2799503", "entity": "8", "state": 1, "tag": "149" } { "time": "2799946", "entity": "9", "state": 1, "tag": "586" } { "time": "2800495", "entity": "38", "state": 1, "tag": "3a3" } { "time": "2801241", "entity": "43", "state": 1, "tag": "53d" } { "time": "2801891", "entity": "50", "state": 1, "tag": "591" } { "time": "2802030", "entity": "28", "state": 1, "tag": "2fc" } { "time": "2802203", "entity": "11", "state": 17 } { "time": "2802513", "entity": "15", "state": 17 } { "time": "2804148", "entity": "22", "state": 0, "tag": "48d4e18" } { "time": "2804983", "entity": "12", "state": 17 } { "state": 1, "tag": "159", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "3c4", "thread": "zfs`dbuf_evict_thread", "taskq": "" } { "state": 1, "tag": "454", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2807716", "entity": "21", "state": 17 } { "state": 1, "tag": "532", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2809330", "entity": "46", "state": 1, "tag": "3c4" } { "time": "2809907", "entity": "9", "state": 1, "tag": "159" } { "time": "2809959", "entity": "48", "state": 1, "tag": "454" } { "state": 1, "tag": "401", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2812244", "entity": "22", "state": 17 } { "time": "2812381", "entity": "38", "state": 17 } { "time": "2812838", "entity": "50", "state": 1, "tag": "532" } { "state": 1, "tag": "441", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2813618", "entity": "43", "state": 1, "tag": "401" } { "time": "2813635", "entity": "24", "state": 17 } { "time": "2813655", "entity": "4", "state": 17 } { "state": 1, "tag": "201", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2816419", "entity": "31", "state": 17 } { "state": 1, "tag": "109", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "4f0", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 7, "tag": "ffffd062dbd3caa0", "driver": "ixgbe", "instance": 0 } { "time": "2817983", "entity": "13", "state": 17 } { "time": "2818893", "entity": "4", "state": 1, "tag": "109" } { "time": "2819739", "entity": "35", "state": 17 } { "state": 1, "tag": "56f", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2820521", "entity": "44", "state": 1, "tag": "4f0" } { "state": 1, "tag": "474", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2820846", "entity": "31", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "2821964", "entity": "4", "state": 17 } { "time": "2822271", "entity": "47", "state": 1, "tag": "441" } { "time": "2823215", "entity": "19", "state": 1, "tag": "201" } { "time": "2823281", "entity": "28", "state": 17 } { "time": "2823339", "entity": "50", "state": 1, "tag": "474" } { "time": "2824040", "entity": "22", "state": 1, "tag": "56f" } { "time": "2824727", "entity": "8", "state": 17 } { "time": "2825090", "entity": "20", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2826403", "entity": "35", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "2827341", "entity": "15", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2827641", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2828147", "entity": "31", "state": 17 } { "time": "2828240", "entity": "44", "state": 17 } { "time": "2828434", "entity": "48", "state": 17 } { "time": "2828810", "entity": "13", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2828928", "entity": "18", "state": 7, "tag": "ffffd062dbd3caa0" } { "state": 1, "tag": "231", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2831848", "entity": "32", "state": 7, "tag": "ffffd062dbcb7d58" } { "state": 1, "tag": "3b3", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2832759", "entity": "9", "state": 17 } { "time": "2833726", "entity": "22", "state": 1, "tag": "231" } { "time": "2834743", "entity": "39", "state": 1, "tag": "3b3" } { "time": "2834868", "entity": "52", "state": 17 } { "time": "2835340", "entity": "41", "state": 0, "tag": "497d212" } { "time": "2836018", "entity": "20", "state": 17 } { "time": "2836192", "entity": "15", "state": 17 } { "time": "2836248", "entity": "35", "state": 17 } { "time": "2836415", "entity": "19", "state": 0, "tag": "497e0d4" } { "time": "2837835", "entity": "22", "state": 17 } { "time": "2838427", "entity": "13", "state": 17 } { "state": 1, "tag": "55c", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "421", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2841934", "entity": "50", "state": 17 } { "time": "2842485", "entity": "16", "state": 17 } { "time": "2842632", "entity": "43", "state": 17 } { "time": "2842769", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "2843248", "entity": "32", "state": 17 } { "time": "2843749", "entity": "15", "state": 1, "tag": "55c" } { "time": "2844586", "entity": "18", "state": 17 } { "time": "2849706", "entity": "47", "state": 0, "tag": "49a7f32" } { "time": "2850475", "entity": "23", "state": 17 } { "state": 1, "tag": "547", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2851926", "entity": "45", "state": 1, "tag": "421" } { "time": "2853387", "entity": "15", "state": 17 } { "state": 1, "tag": "139", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2854482", "entity": "18", "state": 1, "tag": "547" } { "time": "2857892", "entity": "27", "state": 17 } { "time": "2858407", "entity": "7", "state": 1, "tag": "139" } { "time": "2858890", "entity": "39", "state": 17 } { "time": "2861162", "entity": "18", "state": 17 } { "time": "2865228", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "2865239", "entity": "47", "state": 17 } { "time": "2874241", "entity": "20", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2877147", "entity": "20", "state": 17 } { "time": "2878100", "entity": "18", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2878417", "entity": "49", "state": 17 } { "time": "2880266", "entity": "13", "state": 7, "tag": "ffffd062dbd3caa0" } { "state": 1, "tag": "58a", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "48c0687", "thread": "mac`mac_srs_worker", "taskq": "" } { "time": "2881471", "entity": "7", "state": 17 } { "time": "2882394", "entity": "4", "state": 1, "tag": "58a" } { "time": "2882699", "entity": "18", "state": 17 } { "time": "2884819", "entity": "21", "state": 1, "tag": "48c0687" } { "time": "2885368", "entity": "13", "state": 17 } { "time": "2892650", "entity": "4", "state": 17 } { "state": 0, "tag": "497cdc5", "pid": "565220", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 1, "tag": "119", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2895882", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2896922", "entity": "21", "state": 17 } { "time": "2898855", "entity": "23", "state": 0, "tag": "497cdc5" } { "time": "2899081", "entity": "5", "state": 1, "tag": "119" } { "state": 1, "tag": "2", "driver": "softint", "instance": 0 } { "time": "2904722", "entity": "23", "state": 2, "tag": "1" } { "time": "2905416", "entity": "45", "state": 17 } { "state": 1, "tag": "353", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2908478", "entity": "23", "state": 0, "tag": "497cdc5" } { "time": "2909051", "entity": "53", "state": 17 } { "state": 1, "tag": "592", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2910797", "entity": "33", "state": 1, "tag": "353" } { "time": "2912119", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "2913138", "entity": "15", "state": 1, "tag": "592" } { "time": "2914211", "entity": "29", "state": 17 } { "time": "2918243", "entity": "1", "state": 17 } { "time": "2918569", "entity": "33", "state": 17 } { "state": 1, "tag": "4e9", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "245", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2921512", "entity": "15", "state": 17 } { "time": "2921746", "entity": "5", "state": 17 } { "time": "2923567", "entity": "52", "state": 2, "tag": "1" } { "time": "2923665", "entity": "23", "state": 1, "tag": "245" } { "time": "2923828", "entity": "29", "state": 1, "tag": "4e9" } { "time": "2924126", "entity": "36", "state": 17 } { "state": 1, "tag": "570", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2926812", "entity": "43", "state": 0, "tag": "48d4ced" } { "time": "2927055", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "2927485", "entity": "5", "state": 1, "tag": "570" } { "state": 1, "tag": "1b1", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "ae", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2930823", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2931655", "entity": "14", "state": 1, "tag": "1b1" } { "time": "2932169", "entity": "29", "state": 17 } { "time": "2933048", "entity": "15", "state": 17 } { "time": "2933676", "entity": "5", "state": 17 } { "state": 1, "tag": "343", "thread": "ip`squeue_worker", "taskq": "" } { "time": "2934343", "entity": "1", "state": 1, "tag": "ae" } { "time": "2934772", "entity": "14", "state": 17 } { "time": "2936066", "entity": "32", "state": 1, "tag": "343" } { "time": "2936210", "entity": "26", "state": 17 } { "time": "2939460", "entity": "52", "state": 1, "tag": "494" } { "time": "2939597", "entity": "1", "state": 17 } { "time": "2940588", "entity": "32", "state": 17 } { "time": "2943613", "entity": "23", "state": 0, "tag": "497cdc5" } { "time": "2946897", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "2954837", "entity": "30", "state": 17 } { "state": 1, "tag": "565", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "time": "2959792", "entity": "15", "state": 1, "tag": "565" } { "time": "2968711", "entity": "28", "state": 1, "tag": "2fc" } { "time": "2971712", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "2971952", "entity": "13", "state": 1, "tag": "1a1" } { "time": "2974959", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "2982979", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "2983981", "entity": "34", "state": 7, "tag": "ffffd062dbcb7d58" } { "time": "2986129", "entity": "28", "state": 17 } { "time": "2990466", "entity": "16", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "2994684", "entity": "34", "state": 17 } { "time": "2998520", "entity": "16", "state": 17 } { "time": "2999276", "entity": "18", "state": 0, "tag": "497cdd9" } { "time": "3000587", "entity": "13", "state": 17 } { "state": 1, "tag": "d7", "thread": "ip`squeue_worker", "taskq": "" } { "time": "3004848", "entity": "16", "state": 0, "tag": "497d20a" } { "time": "3004920", "entity": "2", "state": 1, "tag": "d7" } { "time": "3005728", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "3018074", "entity": "23", "state": 17 } { "time": "3019107", "entity": "2", "state": 17 } { "time": "3023591", "entity": "15", "state": 7, "tag": "ffffd062dbd3caa0" } { "time": "3023621", "entity": "10", "state": 17 } { "time": "3026750", "entity": "14", "state": 17 } { "time": "3029498", "entity": "38", "state": 0, "tag": "497cdd0" } { "time": "3029791", "entity": "11", "state": 17 } { "time": "3033399", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3034832", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "3042504", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "3050698", "entity": "15", "state": 17 } { "time": "3059843", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3067142", "entity": "14", "state": 17 } { "time": "3087009", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3091275", "entity": "36", "state": 17 } { "time": "3100875", "entity": "26", "state": 0, "tag": "497d4e2" } { "time": "3103179", "entity": "38", "state": 17 } { "time": "3112559", "entity": "38", "state": 0, "tag": "497cdd0" } { "time": "3130384", "entity": "49", "state": 17 } { "time": "3130852", "entity": "36", "state": 0, "tag": "49a7f42" } { "time": "3144079", "entity": "52", "state": 17 } { "time": "3148229", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3148920", "entity": "9", "state": 17 } { "time": "3152479", "entity": "43", "state": 17 } { "time": "3159520", "entity": "18", "state": 17 } { "time": "3163635", "entity": "18", "state": 0, "tag": "497cdd9" } { "time": "3164268", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3165294", "entity": "43", "state": 0, "tag": "48d4ced" } { "time": "3168555", "entity": "14", "state": 0, "tag": "4a0e388" } { "time": "3171006", "entity": "11", "state": 17 } { "state": 1, "tag": "3ecbe54", "thread": "mac`mac_srs_worker", "taskq": "" } { "time": "3183242", "entity": "52", "state": 17 } { "time": "3183692", "entity": "11", "state": 0, "tag": "497cdd1" } { "time": "3183796", "entity": "33", "state": 1, "tag": "3ecbe54" } { "time": "3186062", "entity": "26", "state": 17 } { "time": "3191125", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3193820", "entity": "33", "state": 17 } { "time": "3203137", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "3207620", "entity": "14", "state": 17 } { "time": "3208377", "entity": "11", "state": 17 } { "time": "3209779", "entity": "9", "state": 17 } { "time": "3228662", "entity": "15", "state": 17 } { "time": "3233904", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3239573", "entity": "1", "state": 0, "tag": "48d4e10" } { "time": "3242310", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3247045", "entity": "4", "state": 15 } { "time": "3249062", "entity": "4", "state": 17 } { "time": "3250489", "entity": "4", "state": 3, "tag": "2" } { "time": "3254343", "entity": "52", "state": 17 } { "time": "3254565", "entity": "4", "state": 17 } { "time": "3257853", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "3260479", "entity": "22", "state": 0, "tag": "48d4e18" } { "time": "3261954", "entity": "19", "state": 17 } { "time": "3266829", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3267804", "entity": "22", "state": 17 } { "time": "3270503", "entity": "4", "state": 16 } { "time": "3271940", "entity": "9", "state": 16 } { "time": "3272354", "entity": "15", "state": 16 } { "time": "3272791", "entity": "18", "state": 16 } { "time": "3272865", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "3273096", "entity": "52", "state": 16 } { "time": "3273281", "entity": "49", "state": 16 } { "time": "3274285", "entity": "17", "state": 16 } { "time": "3274728", "entity": "38", "state": 16 } { "time": "3277012", "entity": "9", "state": 0, "tag": "4980fc2" } { "time": "3277370", "entity": "52", "state": 0, "tag": "49a7f45" } { "time": "3277741", "entity": "49", "state": 0, "tag": "497cdd3" } { "time": "3278500", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3278837", "entity": "18", "state": 0, "tag": "497cdd9" } { "time": "3282801", "entity": "15", "state": 17 } { "time": "3283385", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "3284342", "entity": "38", "state": 0, "tag": "497cdd0" } { "time": "3296061", "entity": "9", "state": 17 } { "time": "3297797", "entity": "4", "state": 17 } { "time": "3306163", "entity": "18", "state": 17 } { "time": "3309408", "entity": "6", "state": 0, "tag": "497cdd9" } { "time": "3316172", "entity": "4", "state": 0, "tag": "49a7f49" } { "time": "3331918", "entity": "17", "state": 17 } { "time": "3339615", "entity": "17", "state": 0, "tag": "49a7f2e" } { "time": "3340029", "entity": "15", "state": 0, "tag": "49a7f32" } { "time": "3343966", "entity": "38", "state": 17 } { "time": "3347924", "entity": "49", "state": 17 } { "time": "3352143", "entity": "38", "state": 15 } { "time": "3352954", "entity": "4", "state": 17 } { "state": 2, "tag": "3", "driver": "softint", "instance": 0 } { "state": 0, "tag": "4a0e384", "pid": "50378", "tid": "1", "execname": "dtrace", "psargs": "/usr/sbin/dtrace -Cs ./postgres-statemap-zfs.d" } { "state": 0, "tag": "49a7f42", "pid": "565192", "tid": "66", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f49", "pid": "565192", "tid": "74", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "497cdd3", "pid": "565192", "tid": "19", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f45", "pid": "565192", "tid": "70", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f32", "pid": "565192", "tid": "51", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f46", "pid": "565192", "tid": "71", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "497cdd0", "pid": "565192", "tid": "16", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "4a0e388", "pid": "50380", "tid": "1", "execname": "pg_xlogdump", "psargs": "/opt/postgresql/current/bin/pg_xlogdump -f /manatee/pg/data/pg_xlog/00000001000" } { "state": 0, "tag": "49a7f3e", "pid": "565192", "tid": "63", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "49a7f2e", "pid": "565192", "tid": "47", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 7, "tag": "ffffd062dbcb7d58", "driver": "ixgbe", "instance": 2 } { "state": 0, "tag": "497cdd1", "pid": "565192", "tid": "17", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "48d4b6d", "pid": "5447", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "state": 0, "tag": "497cdd4", "pid": "565192", "tid": "20", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "497cd9f", "pid": "565192", "tid": "1", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "4980fc2", "pid": "565192", "tid": "27", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "497cdd9", "pid": "565192", "tid": "24", "execname": "pg_prefaulter", "psargs": "/opt/smartdc/manatee/bin/pg_prefaulter run --config=/opt/smartdc/manatee/etc/pg" } { "state": 0, "tag": "48d4b75", "pid": "5447", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "state": 10, "tag": "b", "driver": "softint", "instance": 0 } { "state": 0, "tag": "48d4ade", "pid": "5336", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "state": 0, "tag": "48d4ae8", "pid": "5336", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2021 -k 3021" } { "state": 0, "tag": "4a0e383", "pid": "50377", "tid": "1", "execname": "dtrace", "psargs": "/usr/sbin/dtrace -Cs ./cpu-statemap-tagged.d" } { "state": 0, "tag": "48d4ced", "pid": "5737", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2023 -k 3023" } { "state": 0, "tag": "48d4d00", "pid": "5737", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2023 -k 3023" } { "state": 0, "tag": "497d20a", "pid": "566150", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 0, "tag": "497d212", "pid": "566158", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 0, "tag": "48d4e10", "pid": "5958", "tid": "1", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2024 -k 3024" } { "state": 0, "tag": "497d4e2", "pid": "566865", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 0, "tag": "48d4e18", "pid": "5958", "tid": "2", "execname": "node", "psargs": "node --abort-on-uncaught-exception main.js -f etc/config.json -p 2024 -k 3024" } { "state": 0, "tag": "497e0d4", "pid": "569380", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 1, "tag": "508", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "506", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "56b", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "50c", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "572", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "589", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "511", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "563", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "588", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "50f", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "591", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "568", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "505", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "494", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "50b", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "50a", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "3a3", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "586", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "332", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "1a1", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "431", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "149", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "2fc", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "53d", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "159", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "3c4", "thread": "zfs`dbuf_evict_thread", "taskq": "" } { "state": 1, "tag": "454", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "532", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "401", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "441", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "201", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "109", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "4f0", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 7, "tag": "ffffd062dbd3caa0", "driver": "ixgbe", "instance": 0 } { "state": 1, "tag": "56f", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "474", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "231", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "3b3", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "55c", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "421", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "547", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "139", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "58a", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "48c0687", "thread": "mac`mac_srs_worker", "taskq": "" } { "state": 0, "tag": "497cdc5", "pid": "565220", "tid": "1", "execname": "postgres", "psargs": "/opt/postgresql/9.6.3/bin/postgres -D /manatee/pg/data" } { "state": 1, "tag": "119", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "2", "driver": "softint", "instance": 0 } { "state": 1, "tag": "353", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "592", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "4e9", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "245", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "570", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "1b1", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "ae", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "343", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "565", "thread": "genunix`taskq_thread", "taskq": "callout_taskq" } { "state": 1, "tag": "d7", "thread": "ip`squeue_worker", "taskq": "" } { "state": 1, "tag": "3ecbe54", "thread": "mac`mac_srs_worker", "taskq": "" }