You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mountstats.go 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. // Copyright 2018 The Prometheus Authors
  2. // Licensed under the Apache License, Version 2.0 (the "License");
  3. // you may not use this file except in compliance with the License.
  4. // You may obtain a copy of the License at
  5. //
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. package procfs
  14. // While implementing parsing of /proc/[pid]/mountstats, this blog was used
  15. // heavily as a reference:
  16. // https://utcc.utoronto.ca/~cks/space/blog/linux/NFSMountstatsIndex
  17. //
  18. // Special thanks to Chris Siebenmann for all of his posts explaining the
  19. // various statistics available for NFS.
  20. import (
  21. "bufio"
  22. "fmt"
  23. "io"
  24. "strconv"
  25. "strings"
  26. "time"
  27. )
  28. // Constants shared between multiple functions.
  29. const (
  30. deviceEntryLen = 8
  31. fieldBytesLen = 8
  32. fieldEventsLen = 27
  33. statVersion10 = "1.0"
  34. statVersion11 = "1.1"
  35. fieldTransport10TCPLen = 10
  36. fieldTransport10UDPLen = 7
  37. fieldTransport11TCPLen = 13
  38. fieldTransport11UDPLen = 10
  39. )
  40. // A Mount is a device mount parsed from /proc/[pid]/mountstats.
  41. type Mount struct {
  42. // Name of the device.
  43. Device string
  44. // The mount point of the device.
  45. Mount string
  46. // The filesystem type used by the device.
  47. Type string
  48. // If available additional statistics related to this Mount.
  49. // Use a type assertion to determine if additional statistics are available.
  50. Stats MountStats
  51. }
  52. // A MountStats is a type which contains detailed statistics for a specific
  53. // type of Mount.
  54. type MountStats interface {
  55. mountStats()
  56. }
  57. // A MountStatsNFS is a MountStats implementation for NFSv3 and v4 mounts.
  58. type MountStatsNFS struct {
  59. // The version of statistics provided.
  60. StatVersion string
  61. // The mount options of the NFS mount.
  62. Opts map[string]string
  63. // The age of the NFS mount.
  64. Age time.Duration
  65. // Statistics related to byte counters for various operations.
  66. Bytes NFSBytesStats
  67. // Statistics related to various NFS event occurrences.
  68. Events NFSEventsStats
  69. // Statistics broken down by filesystem operation.
  70. Operations []NFSOperationStats
  71. // Statistics about the NFS RPC transport.
  72. Transport NFSTransportStats
  73. }
  74. // mountStats implements MountStats.
  75. func (m MountStatsNFS) mountStats() {}
  76. // A NFSBytesStats contains statistics about the number of bytes read and written
  77. // by an NFS client to and from an NFS server.
  78. type NFSBytesStats struct {
  79. // Number of bytes read using the read() syscall.
  80. Read uint64
  81. // Number of bytes written using the write() syscall.
  82. Write uint64
  83. // Number of bytes read using the read() syscall in O_DIRECT mode.
  84. DirectRead uint64
  85. // Number of bytes written using the write() syscall in O_DIRECT mode.
  86. DirectWrite uint64
  87. // Number of bytes read from the NFS server, in total.
  88. ReadTotal uint64
  89. // Number of bytes written to the NFS server, in total.
  90. WriteTotal uint64
  91. // Number of pages read directly via mmap()'d files.
  92. ReadPages uint64
  93. // Number of pages written directly via mmap()'d files.
  94. WritePages uint64
  95. }
  96. // A NFSEventsStats contains statistics about NFS event occurrences.
  97. type NFSEventsStats struct {
  98. // Number of times cached inode attributes are re-validated from the server.
  99. InodeRevalidate uint64
  100. // Number of times cached dentry nodes are re-validated from the server.
  101. DnodeRevalidate uint64
  102. // Number of times an inode cache is cleared.
  103. DataInvalidate uint64
  104. // Number of times cached inode attributes are invalidated.
  105. AttributeInvalidate uint64
  106. // Number of times files or directories have been open()'d.
  107. VFSOpen uint64
  108. // Number of times a directory lookup has occurred.
  109. VFSLookup uint64
  110. // Number of times permissions have been checked.
  111. VFSAccess uint64
  112. // Number of updates (and potential writes) to pages.
  113. VFSUpdatePage uint64
  114. // Number of pages read directly via mmap()'d files.
  115. VFSReadPage uint64
  116. // Number of times a group of pages have been read.
  117. VFSReadPages uint64
  118. // Number of pages written directly via mmap()'d files.
  119. VFSWritePage uint64
  120. // Number of times a group of pages have been written.
  121. VFSWritePages uint64
  122. // Number of times directory entries have been read with getdents().
  123. VFSGetdents uint64
  124. // Number of times attributes have been set on inodes.
  125. VFSSetattr uint64
  126. // Number of pending writes that have been forcefully flushed to the server.
  127. VFSFlush uint64
  128. // Number of times fsync() has been called on directories and files.
  129. VFSFsync uint64
  130. // Number of times locking has been attempted on a file.
  131. VFSLock uint64
  132. // Number of times files have been closed and released.
  133. VFSFileRelease uint64
  134. // Unknown. Possibly unused.
  135. CongestionWait uint64
  136. // Number of times files have been truncated.
  137. Truncation uint64
  138. // Number of times a file has been grown due to writes beyond its existing end.
  139. WriteExtension uint64
  140. // Number of times a file was removed while still open by another process.
  141. SillyRename uint64
  142. // Number of times the NFS server gave less data than expected while reading.
  143. ShortRead uint64
  144. // Number of times the NFS server wrote less data than expected while writing.
  145. ShortWrite uint64
  146. // Number of times the NFS server indicated EJUKEBOX; retrieving data from
  147. // offline storage.
  148. JukeboxDelay uint64
  149. // Number of NFS v4.1+ pNFS reads.
  150. PNFSRead uint64
  151. // Number of NFS v4.1+ pNFS writes.
  152. PNFSWrite uint64
  153. }
  154. // A NFSOperationStats contains statistics for a single operation.
  155. type NFSOperationStats struct {
  156. // The name of the operation.
  157. Operation string
  158. // Number of requests performed for this operation.
  159. Requests uint64
  160. // Number of times an actual RPC request has been transmitted for this operation.
  161. Transmissions uint64
  162. // Number of times a request has had a major timeout.
  163. MajorTimeouts uint64
  164. // Number of bytes sent for this operation, including RPC headers and payload.
  165. BytesSent uint64
  166. // Number of bytes received for this operation, including RPC headers and payload.
  167. BytesReceived uint64
  168. // Duration all requests spent queued for transmission before they were sent.
  169. CumulativeQueueMilliseconds uint64
  170. // Duration it took to get a reply back after the request was transmitted.
  171. CumulativeTotalResponseMilliseconds uint64
  172. // Duration from when a request was enqueued to when it was completely handled.
  173. CumulativeTotalRequestMilliseconds uint64
  174. // The average time from the point the client sends RPC requests until it receives the response.
  175. AverageRTTMilliseconds float64
  176. // The count of operations that complete with tk_status < 0. These statuses usually indicate error conditions.
  177. Errors uint64
  178. }
  179. // A NFSTransportStats contains statistics for the NFS mount RPC requests and
  180. // responses.
  181. type NFSTransportStats struct {
  182. // The transport protocol used for the NFS mount.
  183. Protocol string
  184. // The local port used for the NFS mount.
  185. Port uint64
  186. // Number of times the client has had to establish a connection from scratch
  187. // to the NFS server.
  188. Bind uint64
  189. // Number of times the client has made a TCP connection to the NFS server.
  190. Connect uint64
  191. // Duration (in jiffies, a kernel internal unit of time) the NFS mount has
  192. // spent waiting for connections to the server to be established.
  193. ConnectIdleTime uint64
  194. // Duration since the NFS mount last saw any RPC traffic.
  195. IdleTimeSeconds uint64
  196. // Number of RPC requests for this mount sent to the NFS server.
  197. Sends uint64
  198. // Number of RPC responses for this mount received from the NFS server.
  199. Receives uint64
  200. // Number of times the NFS server sent a response with a transaction ID
  201. // unknown to this client.
  202. BadTransactionIDs uint64
  203. // A running counter, incremented on each request as the current difference
  204. // ebetween sends and receives.
  205. CumulativeActiveRequests uint64
  206. // A running counter, incremented on each request by the current backlog
  207. // queue size.
  208. CumulativeBacklog uint64
  209. // Stats below only available with stat version 1.1.
  210. // Maximum number of simultaneously active RPC requests ever used.
  211. MaximumRPCSlotsUsed uint64
  212. // A running counter, incremented on each request as the current size of the
  213. // sending queue.
  214. CumulativeSendingQueue uint64
  215. // A running counter, incremented on each request as the current size of the
  216. // pending queue.
  217. CumulativePendingQueue uint64
  218. }
  219. // parseMountStats parses a /proc/[pid]/mountstats file and returns a slice
  220. // of Mount structures containing detailed information about each mount.
  221. // If available, statistics for each mount are parsed as well.
  222. func parseMountStats(r io.Reader) ([]*Mount, error) {
  223. const (
  224. device = "device"
  225. statVersionPrefix = "statvers="
  226. nfs3Type = "nfs"
  227. nfs4Type = "nfs4"
  228. )
  229. var mounts []*Mount
  230. s := bufio.NewScanner(r)
  231. for s.Scan() {
  232. // Only look for device entries in this function
  233. ss := strings.Fields(string(s.Bytes()))
  234. if len(ss) == 0 || ss[0] != device {
  235. continue
  236. }
  237. m, err := parseMount(ss)
  238. if err != nil {
  239. return nil, err
  240. }
  241. // Does this mount also possess statistics information?
  242. if len(ss) > deviceEntryLen {
  243. // Only NFSv3 and v4 are supported for parsing statistics
  244. if m.Type != nfs3Type && m.Type != nfs4Type {
  245. return nil, fmt.Errorf("%w: Cannot parse MountStats for %q", ErrFileParse, m.Type)
  246. }
  247. statVersion := strings.TrimPrefix(ss[8], statVersionPrefix)
  248. stats, err := parseMountStatsNFS(s, statVersion)
  249. if err != nil {
  250. return nil, err
  251. }
  252. m.Stats = stats
  253. }
  254. mounts = append(mounts, m)
  255. }
  256. return mounts, s.Err()
  257. }
  258. // parseMount parses an entry in /proc/[pid]/mountstats in the format:
  259. //
  260. // device [device] mounted on [mount] with fstype [type]
  261. func parseMount(ss []string) (*Mount, error) {
  262. if len(ss) < deviceEntryLen {
  263. return nil, fmt.Errorf("%w: Invalid device %q", ErrFileParse, ss)
  264. }
  265. // Check for specific words appearing at specific indices to ensure
  266. // the format is consistent with what we expect
  267. format := []struct {
  268. i int
  269. s string
  270. }{
  271. {i: 0, s: "device"},
  272. {i: 2, s: "mounted"},
  273. {i: 3, s: "on"},
  274. {i: 5, s: "with"},
  275. {i: 6, s: "fstype"},
  276. }
  277. for _, f := range format {
  278. if ss[f.i] != f.s {
  279. return nil, fmt.Errorf("%w: Invalid device %q", ErrFileParse, ss)
  280. }
  281. }
  282. return &Mount{
  283. Device: ss[1],
  284. Mount: ss[4],
  285. Type: ss[7],
  286. }, nil
  287. }
  288. // parseMountStatsNFS parses a MountStatsNFS by scanning additional information
  289. // related to NFS statistics.
  290. func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, error) {
  291. // Field indicators for parsing specific types of data
  292. const (
  293. fieldOpts = "opts:"
  294. fieldAge = "age:"
  295. fieldBytes = "bytes:"
  296. fieldEvents = "events:"
  297. fieldPerOpStats = "per-op"
  298. fieldTransport = "xprt:"
  299. )
  300. stats := &MountStatsNFS{
  301. StatVersion: statVersion,
  302. }
  303. for s.Scan() {
  304. ss := strings.Fields(string(s.Bytes()))
  305. if len(ss) == 0 {
  306. break
  307. }
  308. switch ss[0] {
  309. case fieldOpts:
  310. if len(ss) < 2 {
  311. return nil, fmt.Errorf("%w: Incomplete information for NFS stats: %v", ErrFileParse, ss)
  312. }
  313. if stats.Opts == nil {
  314. stats.Opts = map[string]string{}
  315. }
  316. for _, opt := range strings.Split(ss[1], ",") {
  317. split := strings.Split(opt, "=")
  318. if len(split) == 2 {
  319. stats.Opts[split[0]] = split[1]
  320. } else {
  321. stats.Opts[opt] = ""
  322. }
  323. }
  324. case fieldAge:
  325. if len(ss) < 2 {
  326. return nil, fmt.Errorf("%w: Incomplete information for NFS stats: %v", ErrFileParse, ss)
  327. }
  328. // Age integer is in seconds
  329. d, err := time.ParseDuration(ss[1] + "s")
  330. if err != nil {
  331. return nil, err
  332. }
  333. stats.Age = d
  334. case fieldBytes:
  335. if len(ss) < 2 {
  336. return nil, fmt.Errorf("%w: Incomplete information for NFS stats: %v", ErrFileParse, ss)
  337. }
  338. bstats, err := parseNFSBytesStats(ss[1:])
  339. if err != nil {
  340. return nil, err
  341. }
  342. stats.Bytes = *bstats
  343. case fieldEvents:
  344. if len(ss) < 2 {
  345. return nil, fmt.Errorf("%w: Incomplete information for NFS events: %v", ErrFileParse, ss)
  346. }
  347. estats, err := parseNFSEventsStats(ss[1:])
  348. if err != nil {
  349. return nil, err
  350. }
  351. stats.Events = *estats
  352. case fieldTransport:
  353. if len(ss) < 3 {
  354. return nil, fmt.Errorf("%w: Incomplete information for NFS transport stats: %v", ErrFileParse, ss)
  355. }
  356. tstats, err := parseNFSTransportStats(ss[1:], statVersion)
  357. if err != nil {
  358. return nil, err
  359. }
  360. stats.Transport = *tstats
  361. }
  362. // When encountering "per-operation statistics", we must break this
  363. // loop and parse them separately to ensure we can terminate parsing
  364. // before reaching another device entry; hence why this 'if' statement
  365. // is not just another switch case
  366. if ss[0] == fieldPerOpStats {
  367. break
  368. }
  369. }
  370. if err := s.Err(); err != nil {
  371. return nil, err
  372. }
  373. // NFS per-operation stats appear last before the next device entry
  374. perOpStats, err := parseNFSOperationStats(s)
  375. if err != nil {
  376. return nil, err
  377. }
  378. stats.Operations = perOpStats
  379. return stats, nil
  380. }
  381. // parseNFSBytesStats parses a NFSBytesStats line using an input set of
  382. // integer fields.
  383. func parseNFSBytesStats(ss []string) (*NFSBytesStats, error) {
  384. if len(ss) != fieldBytesLen {
  385. return nil, fmt.Errorf("%w: Invalid NFS bytes stats: %v", ErrFileParse, ss)
  386. }
  387. ns := make([]uint64, 0, fieldBytesLen)
  388. for _, s := range ss {
  389. n, err := strconv.ParseUint(s, 10, 64)
  390. if err != nil {
  391. return nil, err
  392. }
  393. ns = append(ns, n)
  394. }
  395. return &NFSBytesStats{
  396. Read: ns[0],
  397. Write: ns[1],
  398. DirectRead: ns[2],
  399. DirectWrite: ns[3],
  400. ReadTotal: ns[4],
  401. WriteTotal: ns[5],
  402. ReadPages: ns[6],
  403. WritePages: ns[7],
  404. }, nil
  405. }
  406. // parseNFSEventsStats parses a NFSEventsStats line using an input set of
  407. // integer fields.
  408. func parseNFSEventsStats(ss []string) (*NFSEventsStats, error) {
  409. if len(ss) != fieldEventsLen {
  410. return nil, fmt.Errorf("%w: invalid NFS events stats: %v", ErrFileParse, ss)
  411. }
  412. ns := make([]uint64, 0, fieldEventsLen)
  413. for _, s := range ss {
  414. n, err := strconv.ParseUint(s, 10, 64)
  415. if err != nil {
  416. return nil, err
  417. }
  418. ns = append(ns, n)
  419. }
  420. return &NFSEventsStats{
  421. InodeRevalidate: ns[0],
  422. DnodeRevalidate: ns[1],
  423. DataInvalidate: ns[2],
  424. AttributeInvalidate: ns[3],
  425. VFSOpen: ns[4],
  426. VFSLookup: ns[5],
  427. VFSAccess: ns[6],
  428. VFSUpdatePage: ns[7],
  429. VFSReadPage: ns[8],
  430. VFSReadPages: ns[9],
  431. VFSWritePage: ns[10],
  432. VFSWritePages: ns[11],
  433. VFSGetdents: ns[12],
  434. VFSSetattr: ns[13],
  435. VFSFlush: ns[14],
  436. VFSFsync: ns[15],
  437. VFSLock: ns[16],
  438. VFSFileRelease: ns[17],
  439. CongestionWait: ns[18],
  440. Truncation: ns[19],
  441. WriteExtension: ns[20],
  442. SillyRename: ns[21],
  443. ShortRead: ns[22],
  444. ShortWrite: ns[23],
  445. JukeboxDelay: ns[24],
  446. PNFSRead: ns[25],
  447. PNFSWrite: ns[26],
  448. }, nil
  449. }
  450. // parseNFSOperationStats parses a slice of NFSOperationStats by scanning
  451. // additional information about per-operation statistics until an empty
  452. // line is reached.
  453. func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) {
  454. const (
  455. // Minimum number of expected fields in each per-operation statistics set
  456. minFields = 9
  457. )
  458. var ops []NFSOperationStats
  459. for s.Scan() {
  460. ss := strings.Fields(string(s.Bytes()))
  461. if len(ss) == 0 {
  462. // Must break when reading a blank line after per-operation stats to
  463. // enable top-level function to parse the next device entry
  464. break
  465. }
  466. if len(ss) < minFields {
  467. return nil, fmt.Errorf("%w: invalid NFS per-operations stats: %v", ErrFileParse, ss)
  468. }
  469. // Skip string operation name for integers
  470. ns := make([]uint64, 0, minFields-1)
  471. for _, st := range ss[1:] {
  472. n, err := strconv.ParseUint(st, 10, 64)
  473. if err != nil {
  474. return nil, err
  475. }
  476. ns = append(ns, n)
  477. }
  478. opStats := NFSOperationStats{
  479. Operation: strings.TrimSuffix(ss[0], ":"),
  480. Requests: ns[0],
  481. Transmissions: ns[1],
  482. MajorTimeouts: ns[2],
  483. BytesSent: ns[3],
  484. BytesReceived: ns[4],
  485. CumulativeQueueMilliseconds: ns[5],
  486. CumulativeTotalResponseMilliseconds: ns[6],
  487. CumulativeTotalRequestMilliseconds: ns[7],
  488. }
  489. if ns[0] != 0 {
  490. opStats.AverageRTTMilliseconds = float64(ns[6]) / float64(ns[0])
  491. }
  492. if len(ns) > 8 {
  493. opStats.Errors = ns[8]
  494. }
  495. ops = append(ops, opStats)
  496. }
  497. return ops, s.Err()
  498. }
  499. // parseNFSTransportStats parses a NFSTransportStats line using an input set of
  500. // integer fields matched to a specific stats version.
  501. func parseNFSTransportStats(ss []string, statVersion string) (*NFSTransportStats, error) {
  502. // Extract the protocol field. It is the only string value in the line
  503. protocol := ss[0]
  504. ss = ss[1:]
  505. switch statVersion {
  506. case statVersion10:
  507. var expectedLength int
  508. if protocol == "tcp" {
  509. expectedLength = fieldTransport10TCPLen
  510. } else if protocol == "udp" {
  511. expectedLength = fieldTransport10UDPLen
  512. } else {
  513. return nil, fmt.Errorf("%w: Invalid NFS protocol \"%s\" in stats 1.0 statement: %v", ErrFileParse, protocol, ss)
  514. }
  515. if len(ss) != expectedLength {
  516. return nil, fmt.Errorf("%w: Invalid NFS transport stats 1.0 statement: %v", ErrFileParse, ss)
  517. }
  518. case statVersion11:
  519. var expectedLength int
  520. if protocol == "tcp" {
  521. expectedLength = fieldTransport11TCPLen
  522. } else if protocol == "udp" {
  523. expectedLength = fieldTransport11UDPLen
  524. } else {
  525. return nil, fmt.Errorf("%w: invalid NFS protocol \"%s\" in stats 1.1 statement: %v", ErrFileParse, protocol, ss)
  526. }
  527. if len(ss) != expectedLength {
  528. return nil, fmt.Errorf("%w: invalid NFS transport stats 1.1 statement: %v", ErrFileParse, ss)
  529. }
  530. default:
  531. return nil, fmt.Errorf("%s: Unrecognized NFS transport stats version: %q", ErrFileParse, statVersion)
  532. }
  533. // Allocate enough for v1.1 stats since zero value for v1.1 stats will be okay
  534. // in a v1.0 response. Since the stat length is bigger for TCP stats, we use
  535. // the TCP length here.
  536. //
  537. // Note: slice length must be set to length of v1.1 stats to avoid a panic when
  538. // only v1.0 stats are present.
  539. // See: https://github.com/prometheus/node_exporter/issues/571.
  540. ns := make([]uint64, fieldTransport11TCPLen)
  541. for i, s := range ss {
  542. n, err := strconv.ParseUint(s, 10, 64)
  543. if err != nil {
  544. return nil, err
  545. }
  546. ns[i] = n
  547. }
  548. // The fields differ depending on the transport protocol (TCP or UDP)
  549. // From https://utcc.utoronto.ca/%7Ecks/space/blog/linux/NFSMountstatsXprt
  550. //
  551. // For the udp RPC transport there is no connection count, connect idle time,
  552. // or idle time (fields #3, #4, and #5); all other fields are the same. So
  553. // we set them to 0 here.
  554. if protocol == "udp" {
  555. ns = append(ns[:2], append(make([]uint64, 3), ns[2:]...)...)
  556. }
  557. return &NFSTransportStats{
  558. Protocol: protocol,
  559. Port: ns[0],
  560. Bind: ns[1],
  561. Connect: ns[2],
  562. ConnectIdleTime: ns[3],
  563. IdleTimeSeconds: ns[4],
  564. Sends: ns[5],
  565. Receives: ns[6],
  566. BadTransactionIDs: ns[7],
  567. CumulativeActiveRequests: ns[8],
  568. CumulativeBacklog: ns[9],
  569. MaximumRPCSlotsUsed: ns[10],
  570. CumulativeSendingQueue: ns[11],
  571. CumulativePendingQueue: ns[12],
  572. }, nil
  573. }