SadServers
  • Scenarios
  • Labs
    All Labs Linux & Bash Web Servers Databases Data Processing Docker Kubernetes CI/CD Infrastructure As Code Observability Tooling / Applications
  • Dashboard
  • Solutions
    For Individuals For Businesses
  • Ranking
  • Newsletter
  • FAQ
  • Documentation
    Support Pro Accounts Pro+ Accounts Business Accounts Gift API CLI/TUI Privacy Troubleshooting Interviews
  • Blog
  • Pricing
  • Gift
    Gift Purchase Gift Redeem
  • About
Log In - Sign Up

"Pos": position manager down + reconcile

Scenario: "Pos": position manager down + reconcile

Level: Hard

Type: Fix

Tags: financial   bash  

Access: Email

Description: FIX (Financial Information eXchange) is a common electronic protocol for trading. Messages are tag=value fields separated by SOH (ASCII 0x01; logs here use |). A message starts with 8= (BeginString), 9= (BodyLength), 35= (MsgType) and ends with 10= (CheckSum). See FIX TagValue encoding.

Dev just called: a deployment of the position manager service (posmgr, a systemd service) went wrong in prod. They've asked you to take a look — posmgr show just errors. Get the service back to active first.

Once it is up, query the service for its CURRENT view (posmgr show). That view is stale: the authoritative trade history is /home/admin/fix/executions.log, raw FIX 4.2 35=8 fills carrying 55=Symbol, 54=Side (1=Buy, 2=Sell) and 32=LastQty.

FIX tag dictionary (lines look like 8=FIX.4.2|9=...|35=8|...|10=...|, | in place of the SOH delimiter):

35  MsgType: D = NewOrderSingle (order), 8 = ExecutionReport (fill)
11  ClOrdID: client order ID (links a fill back to its order)
17  ExecID: fill ID, unique per fill (e.g. EX000151)
55  Symbol: e.g. AAPL, MSFT, TSLA, NVDA, AMD
54  Side: 1 = Buy, 2 = Sell
32  LastQty: shares in this fill
31  LastPx: price of this fill
Reconcile the two and write the TRUE positions to /home/admin/fix/positions.csv as SYMBOL,QTY per line (net = buys minus sells). The file does not exist yet; you create it.

Credit Alex Elliot

Root (sudo) Access: True

Test: posmgr.service is active and positions.csv holds exactly the nets from executions.log: every symbol with its true net qty, no missing, extras or dups.

The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can read and execute.

Time to Solve: 30 minutes.

Send Us Feedback
Get Notified
For announcements like new scenarios. We'll never share your email with anyone else.
SadServersSadServers

Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.

Uptime Robot ratio (30 days)
Product
  • Scenarios
  • For Individuals
  • For Businesses
  • Pricing
Resources
  • FAQ
  • Blog
  • Newsletter
Company
  • About Us
  • Support
  • Privacy Policy
  • Terms of Service
  • Contact
Connect With Us
info@sadservers.com

Made in Canada 🇨🇦
Updated: 2026-09-27 14:36 UTC – c78fe89