Realizing the oscillator algebra as a matrix Lie algebra In Hilgert's & Neeb's Structure and Geometry of Lie Groups, they introduce a Lie algebra, which they call the "oscillator algebra," as an extension of the Heisenberg algebra.
They give a basis $\{p,q,z,h\}$ for this Lie algebra, related by $$[p,q]=z, \\ [h,p]=q, \\ [h,q]=-p,$$ with all other brackets being $0$. For some reason, I felt the need to try to find a finite-dimensional faithful representation for this algebra. Twenty-four hours later...still no real progress.
A quick check (directly from the relations or from Cartan's solvability criterion) will show that this Lie algebra is solvable. The adjoint representation is, thus, not a viable candidate. I hoped playing with upper triangular matrices would bring something, but trying to write out general terms became tedious and unhelpful, and Lie's theorem only works over $\mathbb{C}$ (and some special cases in $\mathbb{R}$).
I've tried finding useful information from the commutators themselves. I think we can assume that $pq=z$ and $qp=0$, but I have no actual proof of this.

I could really use a forceful shove in the right direction. Is there an easier way to go about finding this representation than brute force? If so, what is it?

 A: The following is a faithful complex 3-dimensional representation: $h\mapsto iE_{22}$, $p\mapsto E_{12}+iE_{23}$, $q\mapsto -iE_{12}-E_{23}$, $z\mapsto -2E_{13}$ ($E_{jk}$ being the matrix with only nonzero entry $(j,k)$, equal to 1). Replacing each complex entry $a+ib$ with a matrix block $\begin{pmatrix}a & -b\\ b & a\end{pmatrix}$ yields a faithful 6-dimensional real representation. (A faithful real representation cannot be triangular, because the adjoint representation of this Lie algebra has elements with non-real eigenvalues.)

A variant (using adjoint representation). This Lie algebra has a nontrivial center, but we can embed it in a 5-dimensional Lie algebra $\mathfrak{g}$ with trivial center, namely with basis $(H,h,p,q,z)$ and brackets $[H,p]=p$, $[H,q]=q$, $[H,z]=2z$, $[h,p]=q$, $[h,q]=-p$, $[p,q]=z$. The adjoint representation of the latter Lie algebra is faithful and hence restricts to a faithful 5-dimensional representation of the given Lie algebra. Actually, the ideal with basis $(H,p,q,z)$ has a trivial centralizer, and therefore the adjoint representation of $\mathfrak{g}$ restricts to a faithful representation on this 4-dimensional subspace (defined over the reals).
With the above basis, it maps $h\mapsto\begin{pmatrix} 0 & 0 & 0 & 0\\0 & 0 & -1 & 0\\0 & 1 & 0 & 0\\0 & 0 & 0 & 0\end{pmatrix}$, $p\mapsto\begin{pmatrix} 0 & 0 & 0 & 0\\-1 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 1 & 0\end{pmatrix}$, $q\mapsto\begin{pmatrix} 0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\-1 & 0 & 0 & 0\\0 & -1 & 0 & 0\end{pmatrix}$, $z\mapsto\begin{pmatrix} 0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\-2 & 0 & 0 & 0\end{pmatrix}$ (and $H\mapsto\begin{pmatrix} 0 & 0 & 0 & 0\\0 & 1 & 0 & 0\\0 & 0 & 1 & 0\\0 & 0 & 0 & 2\end{pmatrix}$). Probably it's the same as the one referred to in Dietrich's post.
A: Since the oscillator algebra is an extension of the Heisenberg algebra, we can use the standard matrix representation of the Heisenberg algebra to find a faithful $4$-dimensional matrix representation for the oscillator algebra. A faithful linear representation of dimension $4$ is constructed in the paper Minimal Matrix Representations of Four-Dimensional Lie Algebras by Ghanam and Thompson; where the oscillator algebra is called $g_{4,10}$, and the minimal dimension of a real faithful linear representation of it is equal to $4$. 
Since the adjoint representation is not faithful in this case, we need a slightly modified representation, such as in the case of the Heisenberg Lie algebra.
A: The original reference for a matrix representation is perhaps this paper by Streater from '67, https://projecteuclid.org/euclid.cmp/1103839851
